| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 165 | public function match(array|object $item, array $arguments, array $iterableFilterHandlers): bool |
|
| 31 | { |
||
| 32 | 165 | if (count($arguments) !== 2) { |
|
| 33 | 28 | throw new InvalidArgumentException('$arguments should contain exactly two elements.'); |
|
| 34 | } |
||
| 35 | |||
| 36 | 137 | [$field, $value] = $arguments; |
|
| 37 | 137 | FilterAssert::fieldIsString($field); |
|
| 38 | |||
| 39 | /** @var string $field */ |
||
| 40 | 81 | return $this->compare(ArrayHelper::getValue($item, $field), $value); |
|
| 41 | } |
||
| 43 |