Code Duplication    Length = 7-7 lines in 2 locations

Twig/TokenParser/GimmeListTokenParser.php 1 location

@@ 75-81 (lines=7) @@
72
        }
73
74
        $ignoreContext = null;
75
        if ($stream->nextIf(\Twig\Token::NAME_TYPE, 'ignoreContext')) {
76
            if ($stream->test(\Twig\Token::PUNCTUATION_TYPE, '[')) {
77
                $ignoreContext = $this->parser->getExpressionParser()->parseExpression();
78
            } else {
79
                $ignoreContext = new \Twig\Node\Expression\ArrayExpression([], $token->getLine());
80
            }
81
        }
82
83
        $ifExpression = null;
84
        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\ArrayExpression([], $token->getLine());
62
            }
63
        }
64
65
        $stream->expect(\Twig\Token::BLOCK_END_TYPE);
66
        $body = $this->parser->subparse([$this, 'decideCacheEnd'], true);