Skip to content

Commit

Permalink
Merge pull request #15 from KaririCode-Framework/develop
Browse files Browse the repository at this point in the history
fix: remove check hasKey in set method
  • Loading branch information
walmir-silva authored Oct 30, 2024
2 parents 91c9e7e + e12252b commit c966a11
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Collection/ArrayList.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ public function set(mixed $key, mixed $element): void
if (! $this->isValidArrayKey($key)) {
throw new \InvalidArgumentException('Invalid key type: ' . gettype($key));
}
if (! $this->hasKey($key)) {
throw new \OutOfRangeException('Key not found: ' . $this->keyToString($key));
}
// if (! $this->hasKey($key)) {
// throw new \OutOfRangeException('Key not found: ' . $this->keyToString($key));
// }
$this->elements[$key] = $element;
}

Expand Down

0 comments on commit c966a11

Please sign in to comment.