Skip to content

Commit

Permalink
Fix iterable
Browse files Browse the repository at this point in the history
  • Loading branch information
mpysiak committed Feb 5, 2025
1 parent 4db6bc2 commit 3776294
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ public function resolve(string $resourceClass, ?string $pathPrefix, ?Operation $
return $operation;
}

$namePrefixes = array_merge($this->defaultNamePrefixes, $this->additionalNamePrefixes);
$namePrefixes = array_unique(array_merge(
$this->defaultNamePrefixes,
is_array($this->additionalNamePrefixes) ? $this->additionalNamePrefixes : iterator_to_array($this->additionalNamePrefixes),
));

$resourceMetadataCollection = $this->resourceMetadataCollectionFactory->create($resourceClass);
foreach ($resourceMetadataCollection as $resourceMetadata) {
Expand Down

0 comments on commit 3776294

Please sign in to comment.