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