items[] = $value; } public function removeIndex(int $index) { unset($this->items[$index]); $this->items = array_values($this->items); } public function __clone(): void { $this->items = array_map(fn($v) => clone $v, $this->items); } public function jsonSerialize(): mixed { return array_values($this->items); } }