| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 6 | public function match(array|object $item, FilterInterface $filter, array $iterableFilterHandlers): bool |
|
| 25 | { |
||
| 26 | /** @var Not $filter */ |
||
| 27 | |||
| 28 | 6 | $subFilter = $filter->getFilter(); |
|
| 29 | |||
| 30 | 6 | $filterHandler = $iterableFilterHandlers[$subFilter::class] ?? null; |
|
| 31 | 6 | if ($filterHandler === null) { |
|
| 32 | 1 | throw new LogicException(sprintf('Filter "%s" is not supported.', $subFilter::class)); |
|
| 33 | } |
||
| 34 | 5 | return !$filterHandler->match($item, $subFilter, $iterableFilterHandlers); |
|
| 35 | } |
||
| 37 |