function PropertyItem::__construct
Constructs a class property item node.
Parameters
string|Node\VarLikeIdentifier $name Name:
null|Node\Expr $default Default value:
array<string, mixed> $attributes Additional attributes:
Overrides NodeAbstract::__construct
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ PropertyItem.php, line 21
Class
Namespace
PhpParser\NodeCode
public function __construct($name, ?Node\Expr $default = null, array $attributes = []) {
$this->attributes = $attributes;
$this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name;
$this->default = $default;
}