Skip to content

Commit

Permalink
PHP8.1 Compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
onanying committed Dec 11, 2021
1 parent 62b0fd1 commit 7be8581
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/AbstractConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ public function all()
*
* @return mixed
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->get($offset);
Expand All @@ -180,6 +181,7 @@ public function offsetGet($offset)
*
* @return bool
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return $this->has($offset);
Expand All @@ -193,6 +195,7 @@ public function offsetExists($offset)
*
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
$this->set($offset, $value);
Expand All @@ -205,6 +208,7 @@ public function offsetSet($offset, $value)
*
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
$this->set($offset, null);
Expand All @@ -222,6 +226,7 @@ public function offsetUnset($offset)
* function returns false. If the array is undefined, the function
* returns null
*/
#[\ReturnTypeWillChange]
public function current()
{
return (is_array($this->data) ? current($this->data) : null);
Expand All @@ -234,6 +239,7 @@ public function current()
* If the array is empty or undefined or there is no element at the
* cursor, the function returns null
*/
#[\ReturnTypeWillChange]
public function key()
{
return (is_array($this->data) ? key($this->data) : null);
Expand All @@ -247,6 +253,7 @@ public function key()
* array after the move, the function returns false. If the data array
* is undefined, the function returns null
*/
#[\ReturnTypeWillChange]
public function next()
{
return (is_array($this->data) ? next($this->data) : null);
Expand All @@ -260,6 +267,7 @@ public function next()
* returns false. If the data array is undefined, the function returns
* null
*/
#[\ReturnTypeWillChange]
public function rewind()
{
return (is_array($this->data) ? reset($this->data) : null);
Expand All @@ -270,6 +278,7 @@ public function rewind()
*
* @return bool True if the current index is valid; false otherwise
*/
#[\ReturnTypeWillChange]
public function valid()
{
return (is_array($this->data) ? key($this->data) !== null : false);
Expand Down

0 comments on commit 7be8581

Please sign in to comment.