Conditions | 5 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function supports($object, $targetClass) |
||
31 | { |
||
32 | if (is_array($object) || $object instanceof \Traversable) { |
||
33 | foreach ($object as $element) { |
||
34 | if ($this->modelTransformer->supports($element, $targetClass)) { |
||
35 | // if at least one object supported in homogeneous collection |
||
36 | // it is assumed that all other objects are supported |
||
37 | return true; |
||
38 | } |
||
39 | } |
||
40 | } |
||
41 | |||
42 | return false; |
||
43 | } |
||
44 | |||
71 |