Total Complexity | 17 |
Total Lines | 92 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class Length extends AbstractRule |
||
15 | { |
||
16 | /** |
||
17 | * Minimum length. |
||
18 | * |
||
19 | * @var int |
||
20 | */ |
||
21 | private $min; |
||
22 | |||
23 | /** |
||
24 | * Maximum length. |
||
25 | * |
||
26 | * @var int |
||
27 | */ |
||
28 | private $max; |
||
29 | |||
30 | /** |
||
31 | * Charset. |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | private $charset; |
||
36 | |||
37 | /** |
||
38 | * Length validation rule constructor. |
||
39 | * |
||
40 | * @param int $min |
||
41 | * @param int $max |
||
42 | * @param string $charset |
||
43 | * @throws InvalidArgumentException |
||
44 | * @throws LogicException |
||
45 | */ |
||
46 | public function __construct( |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * Validates input. |
||
70 | * |
||
71 | * @param mixed $input |
||
72 | * |
||
73 | * @return bool |
||
74 | */ |
||
75 | public function isValid($input = null) |
||
108 |