PDepend\Source\Language\PHP\AbstractPHPParser::parseFunctionName PHP Method

parseFunctionName() protected method

Parses a function name from the given tokenizer and returns the string literal representing the function name. If no valid token exists in the token stream, this method will throw an exception.
Since: 0.10.0
protected parseFunctionName ( ) : string
return string
    protected function parseFunctionName()
    {
        $tokenType = $this->tokenizer->peek();
        if ($this->isFunctionName($tokenType)) {
            return $this->consumeToken($tokenType)->image;
        } elseif ($tokenType === Tokenizer::T_EOF) {
            throw new TokenStreamEndException($this->tokenizer);
        }
        $this->throwUnexpectedTokenException();
    }
AbstractPHPParser