@@ -55,6 +55,7 @@ public function __construct($endpoint, array $params, array $data, Paylike $payl
55
55
* @link http://php.net/manual/en/iterator.rewind.php
56
56
* @return void Any returned value is ignored.
57
57
*/
58
+ #[\ReturnTypeWillChange]
58
59
public function rewind ()
59
60
{
60
61
$ this ->current_index = 0 ;
@@ -65,6 +66,7 @@ public function rewind()
65
66
* @link http://php.net/manual/en/iterator.current.php
66
67
* @return mixed Can return any type.
67
68
*/
69
+ #[\ReturnTypeWillChange]
68
70
public function current ()
69
71
{
70
72
return $ this ->collection [$ this ->current_index ];
@@ -75,6 +77,7 @@ public function current()
75
77
* @link http://php.net/manual/en/iterator.key.php
76
78
* @return mixed scalar on success, or null on failure.
77
79
*/
80
+ #[\ReturnTypeWillChange]
78
81
public function key ()
79
82
{
80
83
return $ this ->current_index ;
@@ -85,6 +88,7 @@ public function key()
85
88
* @link http://php.net/manual/en/iterator.next.php
86
89
* @return null any returned value is ignored.
87
90
*/
91
+ #[\ReturnTypeWillChange]
88
92
public function next ()
89
93
{
90
94
++$ this ->current_index ;
@@ -99,6 +103,7 @@ public function next()
99
103
* @return boolean The return value will be casted to boolean and then evaluated.
100
104
* Returns true on success or false on failure.
101
105
*/
106
+ #[\ReturnTypeWillChange]
102
107
public function valid ()
103
108
{
104
109
return isset ($ this ->collection [$ this ->current_index ]);
@@ -107,6 +112,7 @@ public function valid()
107
112
/**
108
113
* @return integer
109
114
*/
115
+ #[\ReturnTypeWillChange]
110
116
public function count ()
111
117
{
112
118
return max ($ this ->total_count , count ($ this ->collection ));
@@ -123,6 +129,7 @@ public function count()
123
129
* <p>
124
130
* The return value will be casted to boolean if non-boolean was returned.
125
131
*/
132
+ #[\ReturnTypeWillChange]
126
133
public function offsetExists ($ offset )
127
134
{
128
135
$ exists = isset ($ this ->collection [$ offset ]);
@@ -145,6 +152,7 @@ public function offsetExists($offset)
145
152
* </p>
146
153
* @return mixed Can return all value types.
147
154
*/
155
+ #[\ReturnTypeWillChange]
148
156
public function offsetGet ($ offset )
149
157
{
150
158
$ value = isset ($ this ->collection [$ offset ]) ? $ this ->collection [$ offset ] : null ;
@@ -170,6 +178,7 @@ public function offsetGet($offset)
170
178
* </p>
171
179
* @return void
172
180
*/
181
+ #[\ReturnTypeWillChange]
173
182
public function offsetSet ($ offset , $ value )
174
183
{
175
184
if ($ offset === null ) {
@@ -187,6 +196,7 @@ public function offsetSet($offset, $value)
187
196
* </p>
188
197
* @return void
189
198
*/
199
+ #[\ReturnTypeWillChange]
190
200
public function offsetUnset ($ offset )
191
201
{
192
202
unset($ this ->collection [$ offset ]);
@@ -195,6 +205,7 @@ public function offsetUnset($offset)
195
205
/**
196
206
* @return $this
197
207
*/
208
+ #[\ReturnTypeWillChange]
198
209
private function fetchNext ()
199
210
{
200
211
$ this ->updateOffset ()->fetch ();
@@ -205,6 +216,7 @@ private function fetchNext()
205
216
/**
206
217
* @return $this
207
218
*/
219
+ #[\ReturnTypeWillChange]
208
220
private function fetch ()
209
221
{
210
222
$ api_response = $ this ->paylike ->client ->request ('GET ' , $ this ->endpoint , $ this ->params );
@@ -219,6 +231,7 @@ private function fetch()
219
231
/**
220
232
* If after is set, then we increment it, otherwise we increment before
221
233
*/
234
+ #[\ReturnTypeWillChange]
222
235
private function updateOffset ()
223
236
{
224
237
if ($ this ->after ()) {
@@ -232,6 +245,7 @@ private function updateOffset()
232
245
/**
233
246
* @return mixed
234
247
*/
248
+ #[\ReturnTypeWillChange]
235
249
private function after ()
236
250
{
237
251
return $ this ->params ['after ' ];
@@ -240,6 +254,7 @@ private function after()
240
254
/**
241
255
* @return mixed
242
256
*/
257
+ #[\ReturnTypeWillChange]
243
258
private function before ()
244
259
{
245
260
return $ this ->params ['before ' ];
@@ -248,6 +263,7 @@ private function before()
248
263
/**
249
264
* @return mixed
250
265
*/
266
+ #[\ReturnTypeWillChange]
251
267
private function limit ()
252
268
{
253
269
return $ this ->params ['limit ' ];
0 commit comments