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 |
||
31 | 8 | public function visit(TreeNodeInterface $node): ArrayListInterface |
|
32 | { |
||
33 | 8 | $resultList = new ArrayList(); |
|
34 | 8 | if ($node !== null) { |
|
35 | 8 | $resultList->append($node->getItem()); |
|
36 | 8 | foreach($node->getChildren() as $child) { |
|
37 | 8 | $resultList->merge($child->accept($this)); |
|
38 | } |
||
39 | } |
||
40 | 8 | return $resultList; |
|
41 | } |
||
43 |