Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
26 | 31 | public function useWith($key, $value) |
|
27 | { |
||
28 | // Do not use with $* operators |
||
29 | 31 | if (strpos($key, '$') === 0) |
|
30 | { |
||
31 | 5 | return false; |
|
32 | } |
||
33 | // Special case for mongo id... |
||
34 | 27 | if ($value instanceof MongoId) |
|
35 | { |
||
36 | 6 | return true; |
|
37 | } |
||
38 | // Use only with simple values |
||
39 | 24 | return is_scalar($value); |
|
40 | } |
||
41 | |||
52 |