Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
19 | 2 | public function isAccept(array $filters) |
|
20 | { |
||
21 | 2 | foreach ($filters as $filterConfig) { |
|
22 | 2 | $localAccept = $this->registry->get($filterConfig['type']) |
|
23 | 2 | ->isAccept($filterConfig['value'], $filterConfig['options']); |
|
24 | |||
25 | 2 | $validWhenReturn = $filterConfig['valid_when_return'] ?? true; |
|
26 | |||
27 | 2 | if ($localAccept !== $validWhenReturn) { |
|
28 | 2 | return false; |
|
29 | } |
||
30 | } |
||
31 | |||
32 | 1 | return true; |
|
33 | } |
||
35 |