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

parseOptionalTraitAdaptation() private method

Parses the adaptation list of the given use statement or simply reads the terminating semicolon, when no adaptation list exists.
Since: 1.0.0
private parseOptionalTraitAdaptation ( PDepend\Source\AST\ASTTraitUseStatement $useStatement ) : PDepend\Source\AST\ASTTraitUseStatement
$useStatement PDepend\Source\AST\ASTTraitUseStatement
return PDepend\Source\AST\ASTTraitUseStatement
    private function parseOptionalTraitAdaptation(\PDepend\Source\AST\ASTTraitUseStatement $useStatement)
    {
        $this->consumeComments();
        if (Tokens::T_CURLY_BRACE_OPEN === $this->tokenizer->peek()) {
            $useStatement->addChild($this->parseTraitAdaptation());
        } else {
            $this->consumeToken(Tokens::T_SEMICOLON);
        }
        return $useStatement;
    }
AbstractPHPParser