mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Fix iterable
This commit is contained in:
parent
4db6bc2c09
commit
c7aea308ff
1 changed files with 13 additions and 1 deletions
|
|
@ -1,5 +1,14 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of the Sylius package.
|
||||||
|
*
|
||||||
|
* (c) Sylius Sp. z o.o.
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Sylius\Bundle\ApiBundle\Resolver;
|
namespace Sylius\Bundle\ApiBundle\Resolver;
|
||||||
|
|
@ -35,7 +44,10 @@ final class PathPrefixBasedOperationResolver implements OperationResolverInterfa
|
||||||
return $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);
|
$resourceMetadataCollection = $this->resourceMetadataCollectionFactory->create($resourceClass);
|
||||||
foreach ($resourceMetadataCollection as $resourceMetadata) {
|
foreach ($resourceMetadataCollection as $resourceMetadata) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue