@@ -256,7 +256,7 @@ public function toArray($associative = true, ...$keys)
256
256
*
257
257
* @since 1.0
258
258
*/
259
- public function count (): int
259
+ public function count ()
260
260
{
261
261
return \count ($ this ->objects );
262
262
}
@@ -268,7 +268,7 @@ public function count(): int
268
268
*
269
269
* @since 1.0
270
270
*/
271
- public function clear (): DataSet
271
+ public function clear ()
272
272
{
273
273
$ this ->objects = [];
274
274
$ this ->rewind ();
@@ -279,11 +279,11 @@ public function clear(): DataSet
279
279
/**
280
280
* Get the current data object in the set.
281
281
*
282
- * @return DataObject|bool The current object, or false if the array is empty or the pointer is beyond the end of the elements.
282
+ * @return DataObject|false The current object, or false if the array is empty or the pointer is beyond the end of the elements.
283
283
*
284
284
* @since 1.0
285
285
*/
286
- public function current (): DataObject | bool
286
+ public function current ()
287
287
{
288
288
return is_scalar ($ this ->current ) ? $ this ->objects [$ this ->current ] : false ;
289
289
}
@@ -350,11 +350,11 @@ public function jsonSerialize()
350
350
/**
351
351
* Gets the key of the current object in the iterator.
352
352
*
353
- * @return int|bool|null The object key on success; false on failure.
353
+ * @return integer|false The object key on success; false on failure.
354
354
*
355
355
* @since 1.0
356
356
*/
357
- public function key (): int | bool | null
357
+ public function key ()
358
358
{
359
359
return $ this ->current ;
360
360
}
@@ -397,7 +397,7 @@ public function walk(callable $funcname)
397
397
*
398
398
* @since 1.0
399
399
*/
400
- public function next (): void
400
+ public function next ()
401
401
{
402
402
// Get the object offsets.
403
403
$ keys = $ this ->keys ();
@@ -430,7 +430,7 @@ public function next(): void
430
430
*
431
431
* @since 1.0
432
432
*/
433
- public function offsetExists ($ offset ): bool
433
+ public function offsetExists ($ offset )
434
434
{
435
435
return isset ($ this ->objects [$ offset ]);
436
436
}
@@ -444,7 +444,7 @@ public function offsetExists($offset): bool
444
444
*
445
445
* @since 1.0
446
446
*/
447
- public function offsetGet ($ offset ): DataObject | null
447
+ public function offsetGet ($ offset )
448
448
{
449
449
return $ this ->objects [$ offset ] ?? null ;
450
450
}
@@ -460,7 +460,7 @@ public function offsetGet($offset): DataObject|null
460
460
* @since 1.0
461
461
* @throws \InvalidArgumentException if an object is not an instance of DataObject.
462
462
*/
463
- public function offsetSet ($ offset , $ object ): void
463
+ public function offsetSet ($ offset , $ object )
464
464
{
465
465
if (!($ object instanceof DataObject)) {
466
466
throw new \InvalidArgumentException (
@@ -489,7 +489,7 @@ public function offsetSet($offset, $object): void
489
489
*
490
490
* @since 1.0
491
491
*/
492
- public function offsetUnset ($ offset ): void
492
+ public function offsetUnset ($ offset )
493
493
{
494
494
if (!isset ($ this [$ offset ])) {
495
495
// Do nothing if the offset does not exist.
@@ -522,7 +522,7 @@ public function offsetUnset($offset): void
522
522
*
523
523
* @since 1.0
524
524
*/
525
- public function rewind (): void
525
+ public function rewind ()
526
526
{
527
527
// Set the current position to the first object.
528
528
if (empty ($ this ->objects )) {
@@ -540,7 +540,7 @@ public function rewind(): void
540
540
*
541
541
* @since 1.0
542
542
*/
543
- public function valid (): bool
543
+ public function valid ()
544
544
{
545
545
// Check the current position.
546
546
if (!is_scalar ($ this ->current ) || !isset ($ this ->objects [$ this ->current ])) {
0 commit comments