PDepend\Source\Language\PHP\PHPParserVersion70::parseFormalParameter PHP Method

parseFormalParameter() protected method

-- ------- function foo(Bar $x, $y = 42) } -- -------
Since: 2.0.7
protected parseFormalParameter ( ) : PDepend\Source\AST\ASTFormalParameter
return PDepend\Source\AST\ASTFormalParameter
    protected function parseFormalParameter()
    {
        $parameter = $this->builder->buildAstFormalParameter();
        if (Tokens::T_ELLIPSIS === $this->tokenizer->peek()) {
            $this->consumeToken(Tokens::T_ELLIPSIS);
            $this->consumeComments();
            $parameter->setVariableArgList();
        }
        $parameter->addChild($this->parseVariableDeclarator());
        return $parameter;
    }