Conditions | 4 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | 18 | public function match(array $item, array $arguments, array $filterProcessors): bool |
|
22 | { |
||
23 | 18 | if (count($arguments) !== 3) { |
|
24 | 4 | throw new InvalidArgumentException('$arguments should contain exactly three elements.'); |
|
25 | } |
||
26 | |||
27 | 14 | [$field, $firstValue, $secondValue] = $arguments; |
|
28 | 14 | FilterDataValidationHelper::assertFieldIsString($field); |
|
29 | |||
30 | /** @var string $field */ |
||
31 | 6 | return array_key_exists($field, $item) && $item[$field] >= $firstValue && $item[$field] <= $secondValue; |
|
32 | } |
||
34 |