Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
42 | 1 | private function parseNode(AttributeNodeInterface $parent, Node ...$astNodes): NodeInterface |
|
43 | { |
||
44 | 1 | return array_reduce( |
|
45 | 1 | $astNodes, |
|
46 | function (AttributeNodeInterface $carry, Node $astNode): NodeInterface { |
||
47 | return $carry |
||
48 | 1 | ->add( |
|
49 | 1 | $this->parseNode( |
|
50 | 1 | $this->createNode([ |
|
51 | 1 | 'label' => $astNode->getNodeKindName(), |
|
52 | 1 | 'astNode' => $astNode, |
|
53 | ]), |
||
54 | 1 | ...$astNode->getChildNodes() |
|
55 | ) |
||
56 | ); |
||
57 | 1 | }, |
|
58 | $parent |
||
59 | ); |
||
62 |