Update Ary.php for laravel 10
This commit is contained in:
committed by
GitHub
parent
d95b932890
commit
4af35634fe
12
src/Ary.php
12
src/Ary.php
@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user