Conditions | 4 |
Paths | 3 |
Total Lines | 7 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
46 | private static function valueIsNullAndValid(bool $allowNull, string $value = null) : bool |
||
47 | { |
||
48 | if ($allowNull === false && $value === null) { |
||
49 | throw new FilterException('Value failed filtering, $allowNull is set to false'); |
||
50 | } |
||
51 | |||
52 | return $allowNull === true && $value === null; |
||
53 | } |
||
55 |