Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function check($value): bool |
||
29 | { |
||
30 | 4 | $this->requireParameters($this->fillableParams); |
|
31 | |||
32 | 4 | $min = $this->getBytesSize($this->parameter('min')); |
|
33 | 4 | $max = $this->getBytesSize($this->parameter('max')); |
|
34 | 4 | $valueSize = $this->getValueSize($value); |
|
35 | |||
36 | if (! is_numeric($valueSize)) { |
||
37 | 2 | return false; |
|
38 | } |
||
39 | |||
40 | 4 | return $valueSize >= $min && $valueSize <= $max; |
|
41 | } |
||
43 |