| Conditions | 5 |
| Paths | 6 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 5 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 68 | 14 | public function add(Expr $expr) |
|
| 69 | { |
||
| 70 | 14 | $node = $expr->getNode(); |
|
| 71 | 14 | if ($this->node instanceof ArrayNode) { |
|
| 72 | 2 | $this->node->add($node, $expr->isAllowDefault()); |
|
| 73 | 14 | } elseif ($this->node instanceof ObjectNode) { |
|
| 74 | 14 | $this->node->add($expr->getKey(), $node, $expr->isAllowDefault()); |
|
| 75 | 14 | } |
|
| 76 | |||
| 77 | 14 | if ($node instanceof ArrayNode || $node instanceof ObjectNode) { |
|
| 78 | 14 | $this->node = $node; |
|
| 79 | 14 | } |
|
| 80 | |||
| 81 | 14 | return $this; |
|
| 82 | } |
||
| 83 | |||
| 102 |