Skip to content

Commit

Permalink
Used iterator_to_array from ibexa/polyfill-php82
Browse files Browse the repository at this point in the history
  • Loading branch information
ciastektk committed Aug 9, 2024
1 parent 3ae8390 commit 560a050
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
}

0 comments on commit 560a050

Please sign in to comment.