Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 2.9765 |
Changes | 0 |
1 | <?php |
||
26 | 3 | public function useWith($key, $value) |
|
27 | { |
||
28 | 3 | if (!is_array($value)) |
|
29 | { |
||
30 | 3 | return false; |
|
31 | } |
||
32 | $hasOps = [ |
||
33 | array_key_exists('$gt', $value), |
||
34 | array_key_exists('$gte', $value), |
||
35 | array_key_exists('$lt', $value), |
||
36 | array_key_exists('$lte', $value) |
||
37 | ]; |
||
38 | return array_sum($hasOps) > 0; |
||
39 | } |
||
40 | |||
55 | } |