*/ protected ?array $attributes = null; /** * @param array $attributes */ public function attributes(array $attributes): static { $this->attributes = $attributes; return $this; } protected function getAttributes(): ComponentAttributeBag { return new ComponentAttributeBag($this->attributes ?? []); } }