Total Complexity | 4 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 50% |
Changes | 0 |
1 | <?php |
||
23 | class DataHelper { |
||
24 | /** |
||
25 | * Validate AN..$max. |
||
26 | * |
||
27 | * @param string $value Value to validate. |
||
28 | * @param int $max Max length of value. |
||
29 | * @throws InvalidArgumentException Throws invalid argument exception when string is longer then max length. |
||
30 | */ |
||
31 | 2 | public static function validate_an( $value, $max ) { |
|
43 | } |
||
44 | |||
45 | /** |
||
46 | * Validate null or AN..$max. |
||
47 | * |
||
48 | * @param string|null $value Value to validate. |
||
49 | * @param int $max Max length of value. |
||
50 | * @throws InvalidArgumentException Throws invalid argument exception when value is not null and longer then max length. |
||
51 | */ |
||
52 | 1 | public static function validate_null_or_an( $value, $max ) { |
|
60 |