Conditions | 4 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
35 | 4 | private function flatten(\ArrayIterator $result, $input) |
|
36 | { |
||
37 | 4 | if (is_array($input) || $input instanceof \Traversable) { |
|
38 | |||
39 | /** @noinspection ForeachSourceInspection */ |
||
40 | 4 | foreach ($input as $item) { |
|
41 | 3 | $this->flatten($result, $item); |
|
42 | } |
||
43 | |||
44 | 4 | return; |
|
45 | } |
||
46 | |||
47 | 3 | $result->append($input); |
|
48 | 3 | } |
|
50 |