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