1 <?php declare(strict_types=1);
3 namespace PhpParser\Node\Stmt;
7 class PropertyProperty extends Node\Stmt
9 /** @var Node\VarLikeIdentifier Name */
11 /** @var null|Node\Expr Default */
15 * Constructs a class property node.
17 * @param string|Node\VarLikeIdentifier $name Name
18 * @param null|Node\Expr $default Default value
19 * @param array $attributes Additional attributes
21 public function __construct($name, Node\Expr $default = null, array $attributes = []) {
22 parent::__construct($attributes);
23 $this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name;
24 $this->default = $default;
27 public function getSubNodeNames() : array {
28 return ['name', 'default'];
31 public function getType() : string {
32 return 'Stmt_PropertyProperty';