Doctrine\ORM\Query\Parser::_isFunction PHP Method

_isFunction() private method

Checks if the next-next (after lookahead) token starts a function.
private _isFunction ( ) : boolean
return boolean TRUE if the next-next tokens start a function, FALSE otherwise.
    private function _isFunction()
    {
        $peek = $this->_lexer->peek();
        $nextpeek = $this->_lexer->peek();
        $this->_lexer->resetPeek();

        // We deny the COUNT(SELECT * FROM User u) here. COUNT won't be considered a function
        return ($peek['value'] === '(' && $nextpeek['type'] !== Lexer::T_SELECT);
    }
Parser