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

parseTraitMethodReference() private method

The returned array with contain only one element, when the referenced method is specified by the method's name, without the declaring trait. When the method reference contains the declaring trait the returned array will contain two elements. The first element is the plain method name and the second element is an instance of the {@link \PDepend\Source\AST\ASTTraitReference} class that represents the declaring trait.
Since: 1.0.0
private parseTraitMethodReference ( ) : array
return array
    private function parseTraitMethodReference()
    {
        $this->tokenStack->push();
        $qualifiedName = $this->parseQualifiedName();
        $this->consumeComments();
        if (Tokens::T_DOUBLE_COLON === $this->tokenizer->peek()) {
            $traitReference = $this->setNodePositionsAndReturn($this->builder->buildAstTraitReference($qualifiedName));
            $this->consumeToken(Tokens::T_DOUBLE_COLON);
            $this->consumeComments();
            return array($this->parseMethodName(), $traitReference);
        }
        $this->tokenStack->pop();
        return array($qualifiedName);
    }
AbstractPHPParser