Mercurial > hg > cmmr2012-drupal-site
diff vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children |
line wrap: on
line diff
--- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php Thu Feb 28 11:14:44 2019 +0000 +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php Thu Feb 28 13:11:55 2019 +0000 @@ -3,6 +3,9 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; +use PhpParser\Node\Identifier; +use PhpParser\Node\Name; +use PhpParser\Node\NullableType; class Property extends Node\Stmt { @@ -10,22 +13,26 @@ public $flags; /** @var PropertyProperty[] Properties */ public $props; + /** @var null|Identifier|Name|NullableType Type declaration */ + public $type; /** * Constructs a class property list node. * - * @param int $flags Modifiers - * @param PropertyProperty[] $props Properties - * @param array $attributes Additional attributes + * @param int $flags Modifiers + * @param PropertyProperty[] $props Properties + * @param array $attributes Additional attributes + * @param null|string|Identifier|Name|NullableType $type Type declaration */ - public function __construct(int $flags, array $props, array $attributes = []) { + public function __construct(int $flags, array $props, array $attributes = [], $type = null) { parent::__construct($attributes); $this->flags = $flags; $this->props = $props; + $this->type = \is_string($type) ? new Identifier($type) : $type; } public function getSubNodeNames() : array { - return ['flags', 'props']; + return ['flags', 'type', 'props']; } /** @@ -64,7 +71,7 @@ public function isStatic() : bool { return (bool) ($this->flags & Class_::MODIFIER_STATIC); } - + public function getType() : string { return 'Stmt_Property'; }