Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
85 | public function drop($type) |
||
86 | { |
||
87 | /** @var Node $node */ |
||
88 | $node = array_pop($this->stack); |
||
89 | $this->stacklength--; |
||
90 | if ($node->getType() != $type) { |
||
91 | throw new \RuntimeException("Expected the current node to be of type $type found " . $node->getType() . " instead."); |
||
92 | } |
||
93 | return $node; |
||
94 | } |
||
114 |