Update Ary.php for laravel 10

This commit is contained in:
Néstor Díaz Valencia
2023-10-11 14:13:59 +02:00
committed by GitHub
parent d95b932890
commit 4af35634fe

View File

@ -64,11 +64,11 @@ class Ary extends Collection
/** /**
* Set the item at a given offset. * Set the item at a given offset.
* *
* @param mixed $key * @param TKey|null $key
* @param mixed $value * @param TValue $value
* @return void * @return void
*/ */
public function offsetSet($key, $value) public function offsetSet($key, $value): void
{ {
if (is_null($key)) { if (is_null($key)) {
$this->items[] = $value; $this->items[] = $value;
@ -100,7 +100,11 @@ class Ary extends Collection
* @param mixed $key * @param mixed $key
* @return mixed * @return mixed
*/ */
public function &offsetGet($key) // public function &offsetGet($key)
// {
// return $this->get($key);
// }
public function offsetGet($key): mixed
{ {
return $this->get($key); return $this->get($key);
} }