| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | <?php |
||
| 37 | public function add(NodeInterface $node) |
||
| 38 | { |
||
| 39 | if (isset($this->children[$node->getName()])) { |
||
| 40 | throw new \InvalidArgumentException(sprintf('There is already a child with name: %s', $node->getName())); |
||
| 41 | } |
||
| 42 | |||
| 43 | $this->children[$node->getName()] = $node; |
||
| 44 | |||
| 45 | return $this; |
||
| 46 | } |
||
| 47 | |||
| 77 |