Conditions | 5 |
Paths | 5 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
22 | 6 | public function getIterator(): \Traversable |
|
23 | { |
||
24 | 6 | foreach (parent::getIterator() as $result) { |
|
25 | 6 | $context = []; |
|
26 | |||
27 | 6 | foreach (\array_reverse($result) as $index => $body) { |
|
28 | 6 | if (! \is_string($index)) { |
|
29 | 6 | $context[] = $body; |
|
30 | 6 | continue; |
|
31 | } |
||
32 | |||
33 | 6 | if ($body !== '') { |
|
34 | 6 | yield $index => \array_reverse($context); |
|
35 | 6 | continue 2; |
|
36 | } |
||
37 | } |
||
38 | } |
||
39 | 6 | } |
|
40 | } |
||
41 |