Skip to content

Commit e9184b3

Browse files
committed
moved from array to iterable
1 parent d6402de commit e9184b3

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/lib/ResponseTagger/Delegator/DispatcherTagger.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@
88
namespace Ibexa\HttpCache\ResponseTagger\Delegator;
99

1010
use Ibexa\Contracts\HttpCache\ResponseTagger\ResponseTagger;
11+
use function Ibexa\PolyfillPhp82\iterator_to_array;
1112

1213
/**
1314
* Dispatches a value to all registered ResponseTaggers.
1415
*/
1516
readonly class DispatcherTagger implements ResponseTagger
1617
{
1718
/**
18-
* @param \Ibexa\Contracts\HttpCache\ResponseTagger\ResponseTagger[] $taggers
19+
* @param iterable<\Ibexa\Contracts\HttpCache\ResponseTagger\ResponseTagger> $taggers
1920
*/
20-
public function __construct(private array $taggers = [])
21+
public function __construct(private iterable $taggers = [])
2122
{
2223
}
2324

@@ -46,7 +47,7 @@ public function __toString(): string
4647
', ',
4748
array_map(
4849
static fn (ResponseTagger $tagger): string => get_debug_type($tagger),
49-
$this->taggers
50+
iterator_to_array($this->taggers)
5051
)
5152
);
5253

0 commit comments

Comments
 (0)