<?php

namespace App\Repositories\Core\Auth;

class Passwords
{
    public static function validator()
    {
        $validator = new \Password\Validator(new \Password\StringHelper);
        $validator->setMinLength(5);
        $validator->setMinLowerCaseLetters(2);
        $validator->setMinUpperCaseLetters(1);
        $validator->setMinNumbers(1);
        $validator->setMinSymbols(3);

        if ($validator->isValid($password)) {
            printf('password %s is valid'.PHP_EOL, $password);
        } else {
            printf('password %s is invalid'.PHP_EOL, $password);
            var_dump($validator->getErrors());
        }
    }
}
