Conditions | 3 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php declare(strict_types=1); |
||
15 | public function evaluate($leftValue, $rightValue): bool |
||
16 | { |
||
17 | if ($rightValue instanceof TokenCollection) { |
||
18 | $rightValue = $rightValue->toArray(); |
||
19 | } |
||
20 | |||
21 | if (!is_array($rightValue)) { |
||
22 | throw new ParserException(sprintf( |
||
23 | 'Expected array, got "%s"', |
||
24 | gettype($rightValue) |
||
25 | )); |
||
26 | } |
||
27 | |||
28 | return !in_array($leftValue, $rightValue, true); |
||
29 | } |
||
31 |