From 560a05094828a8668e21fa87acf5e9867c58b3f4 Mon Sep 17 00:00:00 2001 From: Tomasz Kryszan Date: Fri, 9 Aug 2024 07:41:06 +0200 Subject: [PATCH] Used iterator_to_array from ibexa/polyfill-php82 --- .../ContentTreeChildrenQueryArgumentResolver.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/bundle/ControllerArgumentResolver/ContentTreeChildrenQueryArgumentResolver.php b/src/bundle/ControllerArgumentResolver/ContentTreeChildrenQueryArgumentResolver.php index a293ef12dd..2f42f3e7d9 100644 --- a/src/bundle/ControllerArgumentResolver/ContentTreeChildrenQueryArgumentResolver.php +++ b/src/bundle/ControllerArgumentResolver/ContentTreeChildrenQueryArgumentResolver.php @@ -11,10 +11,10 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; use Ibexa\Contracts\Rest\Input\Parser\Query\Criterion\CriterionProcessorInterface; +use function Ibexa\PolyfillPhp82\iterator_to_array; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface; use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadata; -use Traversable; /** * @phpstan-import-type TCriterionProcessor from \Ibexa\AdminUi\REST\Input\Parser\CriterionProcessor @@ -66,8 +66,6 @@ private function processFilterQueryCriteria(Request $request): array $criteria = $this->criterionProcessor->processCriteria($criteriaData); - return $criteria instanceof Traversable - ? iterator_to_array($criteria) - : $criteria; + return iterator_to_array($criteria); } }