$attributes Additional attributes * @param int $flags Optional visibility flags * @param list $attrGroups PHP attribute groups */ public function __construct( Expr $var, ?Expr $default = null, ?Node $type = null, bool $byRef = false, bool $variadic = false, array $attributes = [], int $flags = 0, array $attrGroups = [] ) { $this->attributes = $attributes; $this->type = $type; $this->byRef = $byRef; $this->variadic = $variadic; $this->var = $var; $this->default = $default; $this->flags = $flags; $this->attrGroups = $attrGroups; } public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'type', 'byRef', 'variadic', 'var', 'default']; } public function getType(): string { return 'Param'; } /** * Whether this parameter uses constructor property promotion. */ public function isPromoted(): bool { return $this->flags !== 0; } public function isPublic(): bool { return (bool) ($this->flags & Modifiers::PUBLIC); } public function isProtected(): bool { return (bool) ($this->flags & Modifiers::PROTECTED); } public function isPrivate(): bool { return (bool) ($this->flags & Modifiers::PRIVATE); } public function isReadonly(): bool { return (bool) ($this->flags & Modifiers::READONLY); } }