Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
77 | public function drop($type) |
||
78 | { |
||
79 | /** @var Node $node */ |
||
80 | $node = array_pop($this->stack); |
||
81 | $this->stacklength--; |
||
82 | if ($node->getType() != $type) { |
||
83 | throw new \RuntimeException("Expected the current node to be of type $type found " . $node->getType() . " instead."); |
||
84 | } |
||
85 | return $node; |
||
86 | } |
||
106 |