| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function build(DescriptorInterface $descriptor): NodeInterface |
||
| 27 | { |
||
| 28 | $node = new Node($descriptor); |
||
| 29 | $parents = []; |
||
| 30 | if (empty($descriptor->getParentNames())) { |
||
| 31 | return $node; |
||
| 32 | } |
||
| 33 | foreach ($descriptor->getParentNames() as $parentName) { |
||
| 34 | $parents[] = $this->build($this->manager->get($parentName)); |
||
| 35 | } |
||
| 36 | $node->setParents($parents); |
||
| 37 | return $node; |
||
| 38 | } |
||
| 40 |