Skip to content

Commit

Permalink
replaced Criterion with interface
Browse files Browse the repository at this point in the history
  • Loading branch information
ViniTou committed Dec 2, 2024
1 parent d91835f commit 2f8cb3c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"ext-xmlwriter": "*",
"hautelook/templated-uri-bundle": "^3.4",
"ibexa/core": "dev-ibx-8534-core-v5-p2 as 5.0.x-dev",
"ibexa/polyfill-php82": "^1.0",
"lexik/jwt-authentication-bundle": "^2.8",
"symfony/config": "^5.3",
"symfony/dependency-injection": "^5.3",
Expand Down
3 changes: 2 additions & 1 deletion src/lib/Server/Controller/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Ibexa\Contracts\Core\Repository\Values\Content\Relation;
use Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo;
use Ibexa\Contracts\Rest\Exceptions;
use function Ibexa\PolyfillPhp82\iterator_to_array;
use Ibexa\Rest\Message;
use Ibexa\Rest\Server\Controller as RestController;
use Ibexa\Rest\Server\Exceptions\BadRequestException;
Expand Down Expand Up @@ -359,7 +360,7 @@ public function loadContentVersions($contentId, Request $request)
$contentInfo = $this->repository->getContentService()->loadContentInfo($contentId);

return new Values\VersionList(
$this->repository->getContentService()->loadVersions($contentInfo),
iterator_to_array($this->repository->getContentService()->loadVersions($contentInfo)),
$request->getPathInfo()
);
}
Expand Down
6 changes: 2 additions & 4 deletions src/lib/Server/Input/Parser/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Ibexa\Rest\Server\Input\Parser;

use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion as CriterionValue;
use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface;
use Ibexa\Contracts\Rest\Input\ParsingDispatcher;
use Ibexa\Rest\Server\Input\Parser\Criterion as CriterionParser;

Expand Down Expand Up @@ -89,11 +90,8 @@ abstract protected function buildQuery();

/**
* @param array $criteriaArray
* @param \Ibexa\Contracts\Rest\Input\ParsingDispatcher $parsingDispatcher
*
* @return \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion|null A criterion, or a LogicalAnd with a set of Criterion, or null if an empty array was given
*/
private function processCriteriaArray(array $criteriaArray, ParsingDispatcher $parsingDispatcher)
private function processCriteriaArray(array $criteriaArray, ParsingDispatcher $parsingDispatcher): ?CriterionInterface
{
if (count($criteriaArray) === 0) {
return null;
Expand Down

0 comments on commit 2f8cb3c

Please sign in to comment.