function Property::getNode
Returns the built class node.
Return value
Stmt\Property The built property node
Overrides Builder::getNode
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Builder/ Property.php, line 207
Class
Namespace
PhpParser\BuilderCode
public function getNode() : PhpParser\Node {
if ($this->flags & Modifiers::ABSTRACT && !$this->hooks) {
throw new PhpParser\Error('Only hooked properties may be declared abstract');
}
return new Stmt\Property($this->flags !== 0 ? $this->flags : Modifiers::PUBLIC, [
new Node\PropertyItem($this->name, $this->default),
], $this->attributes, $this->type, $this->attributeGroups, $this->hooks);
}