20
20
use Countable ;
21
21
use Iterator ;
22
22
use IteratorIterator ;
23
+ use ReturnTypeWillChange ;
23
24
use Traversable ;
24
25
25
26
use function count ;
@@ -71,6 +72,7 @@ public function __construct(Traversable $traversable)
71
72
* @see http://php.net/countable.count
72
73
* @return integer
73
74
*/
75
+ #[ReturnTypeWillChange]
74
76
public function count ()
75
77
{
76
78
$ this ->exhaustIterator ();
@@ -82,6 +84,7 @@ public function count()
82
84
* @see http://php.net/iterator.current
83
85
* @return mixed
84
86
*/
87
+ #[ReturnTypeWillChange]
85
88
public function current ()
86
89
{
87
90
return current ($ this ->items );
@@ -91,6 +94,7 @@ public function current()
91
94
* @see http://php.net/iterator.key
92
95
* @return mixed
93
96
*/
97
+ #[ReturnTypeWillChange]
94
98
public function key ()
95
99
{
96
100
return key ($ this ->items );
@@ -100,6 +104,7 @@ public function key()
100
104
* @see http://php.net/iterator.next
101
105
* @return void
102
106
*/
107
+ #[ReturnTypeWillChange]
103
108
public function next ()
104
109
{
105
110
if (! $ this ->iteratorExhausted ) {
@@ -118,6 +123,7 @@ public function next()
118
123
* @see http://php.net/iterator.rewind
119
124
* @return void
120
125
*/
126
+ #[ReturnTypeWillChange]
121
127
public function rewind ()
122
128
{
123
129
/* If the iterator has advanced, exhaust it now so that future iteration
@@ -134,6 +140,7 @@ public function rewind()
134
140
* @see http://php.net/iterator.valid
135
141
* @return boolean
136
142
*/
143
+ #[ReturnTypeWillChange]
137
144
public function valid ()
138
145
{
139
146
return $ this ->key () !== null ;
0 commit comments