Conditions | 5 |
Paths | 5 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function __invoke($item): bool |
||
29 | { |
||
30 | $operand = null; |
||
31 | foreach ($this->operators as $operator) { |
||
32 | if ($operand === null) { |
||
33 | if (!$operand = $operator->getChecker()($item)) { |
||
34 | return false; |
||
35 | } |
||
36 | continue; |
||
37 | } |
||
38 | if (!$operand = $operator($operand, $item)) { |
||
39 | return false; |
||
40 | } |
||
41 | } |
||
42 | return true; |
||
43 | } |
||
58 |