Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
54 | private function next(Readable $readable, TokenInterface $token): bool |
||
55 | { |
||
56 | if ($token->name() === 'T_NODE_DEFINITION') { |
||
57 | $this->current = $token->value(1); |
||
58 | return true; |
||
59 | } |
||
60 | |||
61 | if ($this->current === null) { |
||
62 | $error = \sprintf('Unprocessed production %s', $token->value(0)); |
||
63 | throw (new GrammarException($error))->throwsIn($readable, $token->offset()); |
||
64 | } |
||
65 | |||
66 | return false; |
||
67 | } |
||
68 | } |
||
69 |