Conditions | 5 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
40 | protected function validation($input, &$value): bool |
||
41 | { |
||
42 | if (\is_bool($input)) { |
||
43 | return false; |
||
44 | } |
||
45 | |||
46 | $return = filter_var($input, FILTER_VALIDATE_FLOAT); |
||
47 | if ($return === false) { |
||
48 | return false; |
||
49 | } |
||
50 | |||
51 | if ($return < $this->min || $return > $this->max) { |
||
52 | return false; |
||
53 | } |
||
54 | |||
55 | $value = $return; |
||
56 | |||
57 | return true; |
||
58 | } |
||
60 |