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