Conditions | 4 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public static function filter($value, bool $allowNull = false, int $minValue = null, int $maxValue = PHP_INT_MAX) |
||
25 | { |
||
26 | if ($minValue === null) { |
||
27 | $minValue = 0; |
||
28 | } elseif (is_int($minValue) && $minValue < 0) { |
||
29 | throw new \InvalidArgumentException("{$minValue} was not greater or equal to zero"); |
||
30 | } |
||
31 | |||
32 | return Ints::filter($value, $allowNull, $minValue, $maxValue); |
||
33 | } |
||
34 | } |
||
35 |