| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 7 | ||
| Bugs | 2 | Features | 1 |
| 1 | <?php |
||
| 13 | public function add($name, AbstractNode $node) |
||
| 14 | { |
||
| 15 | if (isset($this->children[$name])) { |
||
| 16 | throw new \InvalidArgumentException(sprintf('There is already a node with name %s!', $name)); |
||
| 17 | } |
||
| 18 | |||
| 19 | $node->setParent($this); |
||
| 20 | |||
| 21 | $this->children[$name] = $node; |
||
| 22 | |||
| 23 | return $this; |
||
| 24 | } |
||
| 25 | |||
| 55 |