Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
32 | 2 | public function visit(TreeNodeInterface $node): ArrayListInterface |
|
33 | { |
||
34 | 2 | $resultList = new ArrayList(); |
|
35 | 2 | if ($node !== null) { |
|
36 | 2 | foreach($node->getChildren() as $child) { |
|
37 | 2 | $resultList->merge($child->accept($this)); |
|
38 | } |
||
39 | 2 | $resultList->append($node->getItem()); |
|
40 | } |
||
41 | 2 | return $resultList; |
|
42 | } |
||
44 |