diff --git a/src/Collections/Collection.php b/src/Collections/Collection.php index fba5195..a48946d 100644 --- a/src/Collections/Collection.php +++ b/src/Collections/Collection.php @@ -50,4 +50,17 @@ class Collection extends ImmutableCollection implements ICollection { } return $this; } + + /** + * @inheritDoc + */ + public function offsetSet ($offset, $value): void { + $this->set($offset, $value); + } + /** + * @inheritDoc + */ + public function offsetUnset ($offset): void { + $this->remove($offset); + } } \ No newline at end of file diff --git a/src/Collections/ImmutableCollection.php b/src/Collections/ImmutableCollection.php index b58b1da..a3a88ec 100644 --- a/src/Collections/ImmutableCollection.php +++ b/src/Collections/ImmutableCollection.php @@ -128,13 +128,13 @@ class ImmutableCollection implements IImmutableCollection { /** * @inheritDoc */ - public function offsetSet ($offset, $value) { + public function offsetSet ($offset, $value): void { throw new ImmutableException(); } /** * @inheritDoc */ - public function offsetUnset ($offset) { + public function offsetUnset ($offset): void { throw new ImmutableException(); }