Asm89\Twig\Lint\TokenParser\CatchAll::hasBody PHP Method

hasBody() private method

private hasBody ( Twig_TokenStream $stream )
$stream Twig_TokenStream
    private function hasBody(Twig_TokenStream $stream)
    {
        $look = 0;
        while ($token = $stream->look($look)) {
            if ($token->getType() === Twig_Token::EOF_TYPE) {
                return false;
            }
            if ($token->getType() === Twig_Token::NAME_TYPE && $token->getValue() === 'end' . $this->name) {
                return true;
            }
            $look++;
        }
        return false;
    }