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