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