PhpParser\Node\Param::__construct PHP Method

__construct() public method

Constructs a parameter node.
public __construct ( string $name, Expr $default = null, null | string | Name | NullableType $type = null, boolean $byRef = false, boolean $variadic = false, array $attributes = [] )
$name string Name
$default Expr Default value
$type null | string | Name | NullableType Typehint
$byRef boolean Whether is passed by reference
$variadic boolean Whether this is a variadic argument
$attributes array Additional attributes
    public function __construct($name, Expr $default = null, $type = null, $byRef = false, $variadic = false, array $attributes = array()) {
        parent::__construct($attributes);
        $this->type = $type;
        $this->byRef = $byRef;
        $this->variadic = $variadic;
        $this->name = $name;
        $this->default = $default;
    }