Conditions | 3 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public function parse(Twig_Token $token) |
||
23 | { |
||
24 | // parse attributes |
||
25 | $type = new Twig_Node_Expression_Constant('header', $token->getLine()); |
||
26 | if (!$this->parser->getStream()->test(Twig_Token::PUNCTUATION_TYPE) && !$this->parser->getStream()->test(Twig_Token::BLOCK_END_TYPE)) { |
||
27 | $type = $this->parser->getExpressionParser()->parseExpression(); |
||
28 | } |
||
29 | $properties = $this->parseProperties($token); |
||
30 | $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); |
||
31 | |||
32 | // parse body |
||
33 | $body = $this->parseBody(); |
||
34 | |||
35 | // return node |
||
36 | return new XlsHeaderNode($type, $properties, $body, $token->getLine(), $this->getTag()); |
||
37 | } |
||
38 | |||
47 |