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.
*
* @param mixed $key
* @param mixed $value
* @param TKey|null $key
* @param TValue $value
* @return void
*/
public function offsetSet($key, $value)
public function offsetSet($key, $value): void
{
if (is_null($key)) {
$this->items[] = $value;
@ -100,9 +100,13 @@ class Ary extends Collection
* @param mixed $key
* @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);
}
public function __isset($name)
@ -188,4 +192,4 @@ class Ary extends Collection
}
#endregion
}
}