| Conditions | 5 |
| Paths | 5 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function supports($target, $mode) |
||
| 14 | { |
||
| 15 | if ($mode === self::MODE_APPLY_FILTER) { |
||
| 16 | return false; |
||
| 17 | } |
||
| 18 | |||
| 19 | // we can filter a collection |
||
| 20 | if ($mode === self::MODE_FILTER) { |
||
| 21 | return is_array($target) || $target instanceof \Traversable; |
||
| 22 | } |
||
| 23 | |||
| 24 | // and we know how to handle arrays and objects |
||
| 25 | return is_array($target) || is_object($target); |
||
| 26 | } |
||
| 27 | |||
| 55 |