Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
fix: add #[ReturnTypeWillChange] annotations to Config class
Browse files Browse the repository at this point in the history
For Countable, Iterator, and ArrayAccess methods.

Signed-off-by: Matthew Weier O'Phinney <[email protected]>
  • Loading branch information
weierophinney committed Oct 1, 2021
1 parent f8f2c09 commit f48aea6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
use ArrayAccess;
use Countable;
use Iterator;
// @codingStandardsIgnoreLine
use ReturnTypeWillChange;

use function array_key_exists;
use function count;
Expand Down Expand Up @@ -201,6 +203,7 @@ public function __unset($name)
* @see Countable::count()
* @return int
*/
#[ReturnTypeWillChange]
public function count()
{
return count($this->data);
Expand All @@ -212,6 +215,7 @@ public function count()
* @see Iterator::current()
* @return mixed
*/
#[ReturnTypeWillChange]
public function current()
{
$this->skipNextIteration = false;
Expand All @@ -224,6 +228,7 @@ public function current()
* @see Iterator::key()
* @return mixed
*/
#[ReturnTypeWillChange]
public function key()
{
return key($this->data);
Expand All @@ -235,6 +240,7 @@ public function key()
* @see Iterator::next()
* @return void
*/
#[ReturnTypeWillChange]
public function next()
{
if ($this->skipNextIteration) {
Expand All @@ -251,6 +257,7 @@ public function next()
* @see Iterator::rewind()
* @return void
*/
#[ReturnTypeWillChange]
public function rewind()
{
$this->skipNextIteration = false;
Expand All @@ -263,6 +270,7 @@ public function rewind()
* @see Iterator::valid()
* @return bool
*/
#[ReturnTypeWillChange]
public function valid()
{
return ($this->key() !== null);
Expand All @@ -275,6 +283,7 @@ public function valid()
* @param mixed $offset
* @return bool
*/
#[ReturnTypeWillChange]
public function offsetExists($offset)
{
return $this->__isset($offset);
Expand All @@ -287,6 +296,7 @@ public function offsetExists($offset)
* @param mixed $offset
* @return mixed
*/
#[ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->__get($offset);
Expand All @@ -300,6 +310,7 @@ public function offsetGet($offset)
* @param mixed $value
* @return void
*/
#[ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
$this->__set($offset, $value);
Expand All @@ -312,6 +323,7 @@ public function offsetSet($offset, $value)
* @param mixed $offset
* @return void
*/
#[ReturnTypeWillChange]
public function offsetUnset($offset)
{
$this->__unset($offset);
Expand Down

0 comments on commit f48aea6

Please sign in to comment.