From ec99128d640e2ebef442e166f89015d0780bc0c8 Mon Sep 17 00:00:00 2001 From: expresso-virtual <47707426+expresso-virtual@users.noreply.github.com> Date: Sun, 4 Sep 2022 18:31:47 -0300 Subject: [PATCH] Fix deprecation notice on PHP 8.1 --- src/IteratorImplementation.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/IteratorImplementation.php b/src/IteratorImplementation.php index ebbce1f..725d5f0 100644 --- a/src/IteratorImplementation.php +++ b/src/IteratorImplementation.php @@ -13,26 +13,31 @@ trait IteratorImplementation { abstract public function &getList() : array; + #[\ReturnTypeWillChange] public function current() { return current($this->getList()); } + #[\ReturnTypeWillChange] public function next() { next($this->getList()); } + #[\ReturnTypeWillChange] public function key() { return key($this->getList()); } + #[\ReturnTypeWillChange] public function valid() { return false === key($this->getList()); } + #[\ReturnTypeWillChange] public function rewind() { return reset($this->getList());