Conditions | 3 |
Paths | 2 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
14 | 6 | private static function ensureItemsAreTraversable($items) |
|
15 | { |
||
16 | 6 | if (! is_array($items) and ! $items instanceof \Traversable) { |
|
17 | 2 | throw new \UnexpectedValueException( |
|
18 | 2 | 'Collection returned from getItems() must be either an array or a Traversable object.' |
|
19 | ); |
||
20 | } |
||
21 | 4 | } |
|
22 | |||
68 |