Skip to content

Commit e12252b

Browse files
committed
fix: remove check hasKey in set method
1 parent 6f17c43 commit e12252b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Collection/ArrayList.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ public function set(mixed $key, mixed $element): void
7575
if (! $this->isValidArrayKey($key)) {
7676
throw new \InvalidArgumentException('Invalid key type: ' . gettype($key));
7777
}
78-
if (! $this->hasKey($key)) {
79-
throw new \OutOfRangeException('Key not found: ' . $this->keyToString($key));
80-
}
78+
// if (! $this->hasKey($key)) {
79+
// throw new \OutOfRangeException('Key not found: ' . $this->keyToString($key));
80+
// }
8181
$this->elements[$key] = $element;
8282
}
8383

0 commit comments

Comments
 (0)