Completed
Push — experimental/3.1 ( c83f5d...923e5e )
by Yangsin
63:41 queued 57:20
created

AbstractTokenParser::parse()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 8
rs 9.4285
1
<?php
2
namespace Eccube\Twig\Extension;
3
4
abstract class AbstractTokenParser extends \Twig_TokenParser
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
5
{
6
    protected $app;
7
    public function parse(\Twig_Token $token)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
8
    {
9
        // 引き数を取得
10
        $expr = $this->parser->getExpressionParser()->parseExpression();
11
        // トークンが閉じタグかどうか判定
12
        $this->parser->getStream()->expect(\Twig_Token::BLOCK_END_TYPE);
13
        return new GenericNode($expr, $token->getLine(), $this->getTag(), $this->app['eccube.twig.node.'.$this->getTag()]);
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
14
    }
15
16
    abstract public function getTag();
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
17
}
18