Code Duplication    Length = 7-7 lines in 2 locations

Twig/TokenParser/GimmeListTokenParser.php 1 location

@@ 70-76 (lines=7) @@
67
        }
68
69
        $ignoreContext = null;
70
        if ($stream->nextIf(\Twig_Token::NAME_TYPE, 'ignoreContext')) {
71
            if ($stream->test(\Twig_Token::PUNCTUATION_TYPE, '[')) {
72
                $ignoreContext = $this->parser->getExpressionParser()->parseExpression();
73
            } else {
74
                $ignoreContext = new \Twig_Node_Expression_Array([], $token->getLine());
75
            }
76
        }
77
78
        $ifExpression = null;
79
        if ($stream->nextIf(\Twig_Token::NAME_TYPE, 'if')) {

Twig/TokenParser/GimmeTokenParser.php 1 location

@@ 57-63 (lines=7) @@
54
        }
55
56
        $ignoreContext = null;
57
        if ($stream->nextIf(\Twig_Token::NAME_TYPE, 'ignoreContext')) {
58
            if ($stream->test(\Twig_Token::PUNCTUATION_TYPE, '[')) {
59
                $ignoreContext = $this->parser->getExpressionParser()->parseExpression();
60
            } else {
61
                $ignoreContext = new \Twig_Node_Expression_Array([], $token->getLine());
62
            }
63
        }
64
65
        $stream->expect(\Twig_Token::BLOCK_END_TYPE);
66
        $body = $this->parser->subparse([$this, 'decideCacheEnd'], true);