| Total Complexity | 2 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | class UsernameValidator implements Validator |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var integer $minLength |
||
| 24 | */ |
||
| 25 | private $minLength; |
||
| 26 | /** |
||
| 27 | * @var integer $maxLength |
||
| 28 | */ |
||
| 29 | private $maxLength; |
||
| 30 | /** |
||
| 31 | * @var array $allowedChars |
||
| 32 | */ |
||
| 33 | private $allowedSpecialChars = []; |
||
| 34 | |||
| 35 | public function __construct(int $minLength = 4, int $maxLength = 12, $allowedSpecialChars = []) |
||
| 40 | } |
||
| 41 | |||
| 42 | public function validate($username): Result |
||
| 52 | } |