From f48aea6cc07e955ea5ac9ca199e929d47987c49e Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Fri, 1 Oct 2021 10:57:02 -0500 Subject: [PATCH] fix: add #[ReturnTypeWillChange] annotations to Config class For Countable, Iterator, and ArrayAccess methods. Signed-off-by: Matthew Weier O'Phinney --- src/Config.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Config.php b/src/Config.php index a37457b..5605ba0 100644 --- a/src/Config.php +++ b/src/Config.php @@ -5,6 +5,8 @@ use ArrayAccess; use Countable; use Iterator; +// @codingStandardsIgnoreLine +use ReturnTypeWillChange; use function array_key_exists; use function count; @@ -201,6 +203,7 @@ public function __unset($name) * @see Countable::count() * @return int */ + #[ReturnTypeWillChange] public function count() { return count($this->data); @@ -212,6 +215,7 @@ public function count() * @see Iterator::current() * @return mixed */ + #[ReturnTypeWillChange] public function current() { $this->skipNextIteration = false; @@ -224,6 +228,7 @@ public function current() * @see Iterator::key() * @return mixed */ + #[ReturnTypeWillChange] public function key() { return key($this->data); @@ -235,6 +240,7 @@ public function key() * @see Iterator::next() * @return void */ + #[ReturnTypeWillChange] public function next() { if ($this->skipNextIteration) { @@ -251,6 +257,7 @@ public function next() * @see Iterator::rewind() * @return void */ + #[ReturnTypeWillChange] public function rewind() { $this->skipNextIteration = false; @@ -263,6 +270,7 @@ public function rewind() * @see Iterator::valid() * @return bool */ + #[ReturnTypeWillChange] public function valid() { return ($this->key() !== null); @@ -275,6 +283,7 @@ public function valid() * @param mixed $offset * @return bool */ + #[ReturnTypeWillChange] public function offsetExists($offset) { return $this->__isset($offset); @@ -287,6 +296,7 @@ public function offsetExists($offset) * @param mixed $offset * @return mixed */ + #[ReturnTypeWillChange] public function offsetGet($offset) { return $this->__get($offset); @@ -300,6 +310,7 @@ public function offsetGet($offset) * @param mixed $value * @return void */ + #[ReturnTypeWillChange] public function offsetSet($offset, $value) { $this->__set($offset, $value); @@ -312,6 +323,7 @@ public function offsetSet($offset, $value) * @param mixed $offset * @return void */ + #[ReturnTypeWillChange] public function offsetUnset($offset) { $this->__unset($offset);