| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 8 | ||
| Bugs | 2 | Features | 2 |
| 1 | <?php |
||
| 13 | public function add($name, AbstractNode $node, $allowDefault = false) |
||
| 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 | $this->allowDefault[$name] = $allowDefault; |
||
| 23 | |||
| 24 | return $this; |
||
| 25 | } |
||
| 26 | |||
| 56 |