Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
46 | 1 | private function parseNode(AttributeNodeInterface $parent, array ...$nodes): NodeInterface |
|
47 | { |
||
48 | 1 | return array_reduce( |
|
49 | 1 | $nodes, |
|
50 | function (AttributeNodeInterface $carry, array $node): NodeInterface { |
||
51 | 1 | $node += ['children' => []]; |
|
52 | |||
53 | return $carry |
||
54 | 1 | ->add( |
|
55 | 1 | $this->parseNode( |
|
56 | 1 | $this->createNode($node), |
|
57 | 1 | ...$node['children'] |
|
58 | ) |
||
59 | ); |
||
60 | 1 | }, |
|
61 | $parent |
||
62 | ); |
||
65 |