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