Skip to content

Commit 030dbf8

Browse files
Andrii Krasnoholovetspelanis
Andrii Krasnoholovets
authored andcommitted
Add Traversable return type for getIterator
1 parent 9abfb2c commit 030dbf8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ObjectWrapper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use ArrayAccess;
1111
use Paysera\Component\ObjectWrapper\Exception\InvalidItemTypeException;
1212
use Paysera\Component\ObjectWrapper\Exception\MissingItemException;
13+
use Traversable;
1314

1415
class ObjectWrapper implements ArrayAccess, IteratorAggregate
1516
{
@@ -74,8 +75,7 @@ public function offsetUnset($offset): void
7475
throw new RuntimeException('Modifying ObjectWrapper is not allowed');
7576
}
7677

77-
#[\ReturnTypeWillChange]
78-
public function getIterator()
78+
public function getIterator(): Traversable
7979
{
8080
return new ArrayIterator($this->data);
8181
}

0 commit comments

Comments
 (0)