Skip to content
This repository was archived by the owner on Sep 6, 2025. It is now read-only.

Commit 55cbf96

Browse files
committed
Fixing issues using iterable in PHP7.1
1 parent 7a3fa20 commit 55cbf96

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

src/Serializer/Type/MapHandler.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace HelloFresh\Engine\Serializer\Type;
44

55
use Collections\Map;
6-
use Collections\Iterable;
6+
use Collections\MapInterface;
77
use JMS\Serializer\Context;
88
use JMS\Serializer\GraphNavigator;
99
use JMS\Serializer\Handler\SubscribingHandlerInterface;
@@ -30,8 +30,12 @@ public static function getSubscribingMethods()
3030

3131
}
3232

33-
public function serializeCollection(VisitorInterface $visitor, Iterable $collection, array $type, Context $context)
34-
{
33+
public function serializeCollection(
34+
VisitorInterface $visitor,
35+
MapInterface $collection,
36+
array $type,
37+
Context $context
38+
) {
3539
// We change the base type, and pass through possible parameters.
3640
$type['name'] = 'array';
3741

src/Serializer/Type/VectorHandler.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace HelloFresh\Engine\Serializer\Type;
44

55
use Collections\Vector;
6-
use Collections\Iterable;
6+
use Collections\VectorInterface;
77
use JMS\Serializer\Context;
88
use JMS\Serializer\GraphNavigator;
99
use JMS\Serializer\Handler\SubscribingHandlerInterface;
@@ -29,8 +29,12 @@ public static function getSubscribingMethods()
2929
];
3030
}
3131

32-
public function serializeCollection(VisitorInterface $visitor, Iterable $collection, array $type, Context $context)
33-
{
32+
public function serializeCollection(
33+
VisitorInterface $visitor,
34+
VectorInterface $collection,
35+
array $type,
36+
Context $context
37+
) {
3438
// We change the base type, and pass through possible parameters.
3539
$type['name'] = 'array';
3640

0 commit comments

Comments
 (0)