2020use Countable ;
2121use Iterator ;
2222use IteratorIterator ;
23+ use ReturnTypeWillChange ;
2324use Traversable ;
2425
2526use function count ;
@@ -71,6 +72,7 @@ public function __construct(Traversable $traversable)
7172 * @see http://php.net/countable.count
7273 * @return integer
7374 */
75+ #[ReturnTypeWillChange]
7476 public function count ()
7577 {
7678 $ this ->exhaustIterator ();
@@ -82,6 +84,7 @@ public function count()
8284 * @see http://php.net/iterator.current
8385 * @return mixed
8486 */
87+ #[ReturnTypeWillChange]
8588 public function current ()
8689 {
8790 return current ($ this ->items );
@@ -91,6 +94,7 @@ public function current()
9194 * @see http://php.net/iterator.key
9295 * @return mixed
9396 */
97+ #[ReturnTypeWillChange]
9498 public function key ()
9599 {
96100 return key ($ this ->items );
@@ -100,6 +104,7 @@ public function key()
100104 * @see http://php.net/iterator.next
101105 * @return void
102106 */
107+ #[ReturnTypeWillChange]
103108 public function next ()
104109 {
105110 if (! $ this ->iteratorExhausted ) {
@@ -118,6 +123,7 @@ public function next()
118123 * @see http://php.net/iterator.rewind
119124 * @return void
120125 */
126+ #[ReturnTypeWillChange]
121127 public function rewind ()
122128 {
123129 /* If the iterator has advanced, exhaust it now so that future iteration
@@ -134,6 +140,7 @@ public function rewind()
134140 * @see http://php.net/iterator.valid
135141 * @return boolean
136142 */
143+ #[ReturnTypeWillChange]
137144 public function valid ()
138145 {
139146 return $ this ->key () !== null ;
0 commit comments