Total Complexity | 3 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
21 | class AlphaNumeric implements Rule |
||
22 | { |
||
23 | // TODO: Add AlphaNumeric test |
||
24 | /** |
||
25 | * Special characters excused within the alphanum value |
||
26 | * Handy for username validations |
||
27 | * @var array $allowedSpecialChars |
||
28 | */ |
||
29 | private $allowedSpecialChars; |
||
30 | |||
31 | /** |
||
32 | * AlphaNumeric constructor. |
||
33 | * @param array $allowedSpecialChars |
||
34 | */ |
||
35 | public function __construct($allowedSpecialChars = []) |
||
36 | { |
||
37 | $this->allowedSpecialChars = $allowedSpecialChars; |
||
38 | } |
||
39 | |||
40 | public function validate($data): Result |
||
46 | } |
||
47 | } |