Conditions | 6 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | 4 | public function isPredicate(mixed $value): bool |
|
12 | { |
||
13 | 4 | if ($value instanceof PredicateExpression) { |
|
14 | 4 | return true; |
|
15 | } |
||
16 | |||
17 | if ( |
||
18 | 4 | is_array($value) |
|
19 | 4 | && isset($value[0]) |
|
20 | 4 | && ! is_array($value[0]) |
|
21 | 4 | && ! $value[0] instanceof PredicateExpression |
|
22 | ) { |
||
23 | 4 | return true; |
|
24 | } |
||
25 | |||
26 | 4 | return false; |
|
27 | } |
||
29 |