Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
20 | 1 | public function modify(NodeInterface $tree): NodeInterface |
|
21 | { |
||
22 | 1 | $children = new ArrayObject(); |
|
23 | |||
24 | 1 | foreach ($tree->children() as $child) { |
|
25 | 1 | $children->append($this->modify($child)); |
|
26 | } |
||
27 | |||
28 | 1 | return $tree->withChildren(...array_reverse( |
|
29 | 1 | $children->getArrayCopy() |
|
30 | )); |
||
33 |