@@ -55,6 +55,7 @@ public function __construct($endpoint, array $params, array $data, Paylike $payl
5555 * @link http://php.net/manual/en/iterator.rewind.php
5656 * @return void Any returned value is ignored.
5757 */
58+ #[\ReturnTypeWillChange]
5859 public function rewind ()
5960 {
6061 $ this ->current_index = 0 ;
@@ -65,6 +66,7 @@ public function rewind()
6566 * @link http://php.net/manual/en/iterator.current.php
6667 * @return mixed Can return any type.
6768 */
69+ #[\ReturnTypeWillChange]
6870 public function current ()
6971 {
7072 return $ this ->collection [$ this ->current_index ];
@@ -75,6 +77,7 @@ public function current()
7577 * @link http://php.net/manual/en/iterator.key.php
7678 * @return mixed scalar on success, or null on failure.
7779 */
80+ #[\ReturnTypeWillChange]
7881 public function key ()
7982 {
8083 return $ this ->current_index ;
@@ -85,6 +88,7 @@ public function key()
8588 * @link http://php.net/manual/en/iterator.next.php
8689 * @return null any returned value is ignored.
8790 */
91+ #[\ReturnTypeWillChange]
8892 public function next ()
8993 {
9094 ++$ this ->current_index ;
@@ -99,6 +103,7 @@ public function next()
99103 * @return boolean The return value will be casted to boolean and then evaluated.
100104 * Returns true on success or false on failure.
101105 */
106+ #[\ReturnTypeWillChange]
102107 public function valid ()
103108 {
104109 return isset ($ this ->collection [$ this ->current_index ]);
@@ -107,6 +112,7 @@ public function valid()
107112 /**
108113 * @return integer
109114 */
115+ #[\ReturnTypeWillChange]
110116 public function count ()
111117 {
112118 return max ($ this ->total_count , count ($ this ->collection ));
@@ -123,6 +129,7 @@ public function count()
123129 * <p>
124130 * The return value will be casted to boolean if non-boolean was returned.
125131 */
132+ #[\ReturnTypeWillChange]
126133 public function offsetExists ($ offset )
127134 {
128135 $ exists = isset ($ this ->collection [$ offset ]);
@@ -145,6 +152,7 @@ public function offsetExists($offset)
145152 * </p>
146153 * @return mixed Can return all value types.
147154 */
155+ #[\ReturnTypeWillChange]
148156 public function offsetGet ($ offset )
149157 {
150158 $ value = isset ($ this ->collection [$ offset ]) ? $ this ->collection [$ offset ] : null ;
@@ -170,6 +178,7 @@ public function offsetGet($offset)
170178 * </p>
171179 * @return void
172180 */
181+ #[\ReturnTypeWillChange]
173182 public function offsetSet ($ offset , $ value )
174183 {
175184 if ($ offset === null ) {
@@ -187,6 +196,7 @@ public function offsetSet($offset, $value)
187196 * </p>
188197 * @return void
189198 */
199+ #[\ReturnTypeWillChange]
190200 public function offsetUnset ($ offset )
191201 {
192202 unset($ this ->collection [$ offset ]);
@@ -195,6 +205,7 @@ public function offsetUnset($offset)
195205 /**
196206 * @return $this
197207 */
208+ #[\ReturnTypeWillChange]
198209 private function fetchNext ()
199210 {
200211 $ this ->updateOffset ()->fetch ();
@@ -205,6 +216,7 @@ private function fetchNext()
205216 /**
206217 * @return $this
207218 */
219+ #[\ReturnTypeWillChange]
208220 private function fetch ()
209221 {
210222 $ api_response = $ this ->paylike ->client ->request ('GET ' , $ this ->endpoint , $ this ->params );
@@ -219,6 +231,7 @@ private function fetch()
219231 /**
220232 * If after is set, then we increment it, otherwise we increment before
221233 */
234+ #[\ReturnTypeWillChange]
222235 private function updateOffset ()
223236 {
224237 if ($ this ->after ()) {
@@ -232,6 +245,7 @@ private function updateOffset()
232245 /**
233246 * @return mixed
234247 */
248+ #[\ReturnTypeWillChange]
235249 private function after ()
236250 {
237251 return $ this ->params ['after ' ];
@@ -240,6 +254,7 @@ private function after()
240254 /**
241255 * @return mixed
242256 */
257+ #[\ReturnTypeWillChange]
243258 private function before ()
244259 {
245260 return $ this ->params ['before ' ];
@@ -248,6 +263,7 @@ private function before()
248263 /**
249264 * @return mixed
250265 */
266+ #[\ReturnTypeWillChange]
251267 private function limit ()
252268 {
253269 return $ this ->params ['limit ' ];
0 commit comments