Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | 1 | public function parse(Token $token): Node |
|
27 | { |
||
28 | 1 | $stream = $this->parser->getStream(); |
|
29 | |||
30 | 1 | $stream->expect(Token::BLOCK_END_TYPE); |
|
31 | |||
32 | $body = $this->parser->subparse(function (Token $token): bool { |
||
33 | 1 | return $token->test('endoptional'); |
|
34 | 1 | }, true); |
|
35 | |||
36 | 1 | $stream->expect(Token::BLOCK_END_TYPE); |
|
37 | |||
38 | 1 | return new OptionalNode($body, $token->getLine(), $this->getTag()); |
|
39 | } |
||
49 |