Conditions | 4 |
Paths | 4 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 7 | public function match(array $item, array $arguments, array $filterProcessors): bool |
|
20 | { |
||
21 | 7 | if (count($arguments) !== 3) { |
|
22 | 1 | throw new InvalidArgumentException('$arguments should contain exactly three elements.'); |
|
23 | } |
||
24 | |||
25 | 6 | [$field, $firstValue, $secondValue] = $arguments; |
|
26 | 6 | return array_key_exists($field, $item) && $item[$field] >= $firstValue && $item[$field] <= $secondValue; |
|
27 | } |
||
29 |