File tree Expand file tree Collapse file tree
src/lib/ResponseTagger/Delegator Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88namespace Ibexa \HttpCache \ResponseTagger \Delegator ;
99
1010use Ibexa \Contracts \HttpCache \ResponseTagger \ResponseTagger ;
11+ use function Ibexa \PolyfillPhp82 \iterator_to_array ;
1112
1213/**
1314 * Dispatches a value to all registered ResponseTaggers.
1415 */
1516readonly 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
You can’t perform that action at this time.
0 commit comments