data; $data[$key] = $value; return new self($data); } public function get(string $key, mixed $default = null): mixed { return $this->data[$key] ?? $default; } public function has(string $key): bool { return isset($this->data[$key]); } public function toArray(): array { return $this->data; } public function isEmpty(): bool { return empty($this->data); } public function merge(self $other): self { return new self(array_merge($this->data, $other->data)); } }