Conditions | 5 |
Paths | 7 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
27 | 6 | public static function number($number, array $options = []) |
|
28 | { |
||
29 | 6 | $options = array_merge([ |
|
30 | 6 | 'min' => false, |
|
31 | 6 | 'max' => false, |
|
32 | 6 | ], $options); |
|
33 | |||
34 | 6 | return is_numeric($number) |
|
35 | 6 | && (($options['min'] === false) || ($number >= $options['min'])) |
|
36 | 6 | && (($options['max'] === false) || ($number <= $options['max'])); |
|
37 | } |
||
48 |