Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | private function validateHexadecimal($value) |
||
19 | { |
||
20 | $isValid = filter_var( |
||
21 | $value, |
||
22 | FILTER_VALIDATE_REGEXP, |
||
23 | array( |
||
24 | "options" => array("regexp" => '`^[0-9A-Fa-f]+$`') |
||
25 | ) |
||
26 | ); |
||
27 | if ($isValid === false) { |
||
28 | $this->throwInvalidArgumentMustBe("valid hexadecimal"); |
||
29 | } |
||
30 | } |
||
31 | } |
||
32 |