--- a/src/Illuminate/Support/Collection.php +++ b/src/Illuminate/Support/Collection.php @@ -1242,6 +1242,7 @@ class Collection implements ArrayAccess, Arrayable, Jsonable, JsonSerializable, Countable /** * Count the number of items in the collection. */ + #[\ReturnTypeWillChange] public function count() { return count($this->items); @@ -1274,6 +1275,7 @@ class Collection implements ArrayAccess, Arrayable, Jsonable, JsonSerializable /** * Determine if an item exists at an offset. */ + #[\ReturnTypeWillChange] public function offsetExists($key) { return $this->has($key); @@ -1282,6 +1284,7 @@ class Collection implements ArrayAccess, Arrayable, Jsonable, JsonSerializable /** * Get an item at a given offset. */ + #[\ReturnTypeWillChange] public function offsetGet($key) { return $this->get($key); @@ -1290,6 +1293,7 @@ class Collection implements ArrayAccess, Arrayable, Jsonable, JsonSerializable /** * Set the item at a given offset. */ + #[\ReturnTypeWillChange] public function offsetSet($key, $value) { $this->items[$key] = $value; @@ -1298,6 +1302,7 @@ class Collection implements ArrayAccess, Arrayable, Jsonable, JsonSerializable /** * Unset the item at a given offset. */ + #[\ReturnTypeWillChange] public function offsetUnset($key) { unset($this->items[$key]); @@ -1232,6 +1232,7 @@ class Collection implements ArrayAccess, Arrayable, Jsonable, JsonSerializable, Countable, IteratorAggregate /** * Get an iterator for the items. */ + #[\ReturnTypeWillChange] public function getIterator() { return new ArrayIterator($this->items);