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