From 452bf933ba6fba7e8b69a19df3d275ea96ea037c Mon Sep 17 00:00:00 2001 From: Dawid Parafinski Date: Thu, 21 Nov 2024 16:17:10 +0100 Subject: [PATCH] fixed codestyle --- src/lib/CoreFilter/NativeCoreFilter.php | 1 + src/lib/Query/Common/CriterionVisitor/UserLoginIn.php | 1 - src/lib/Query/Content/CriterionVisitor/SubtreeIn.php | 1 - src/lib/Query/Content/CriterionVisitor/Visibility.php | 1 + .../Query/Image/CriterionVisitor/AbstractImageRangeVisitor.php | 1 - .../Query/Image/CriterionVisitor/AbstractImageTermsVisitor.php | 1 - src/lib/Query/Image/CriterionVisitor/AbstractImageVisitor.php | 1 - 7 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lib/CoreFilter/NativeCoreFilter.php b/src/lib/CoreFilter/NativeCoreFilter.php index 93e870a..e7d1480 100644 --- a/src/lib/CoreFilter/NativeCoreFilter.php +++ b/src/lib/CoreFilter/NativeCoreFilter.php @@ -210,6 +210,7 @@ private function getLanguageFilter(array $languageCodes): Query\CriterionInterfa if (empty($languageFilters)) { throw new RuntimeException('$languageFilters is empty'); } + return reset($languageFilters); } diff --git a/src/lib/Query/Common/CriterionVisitor/UserLoginIn.php b/src/lib/Query/Common/CriterionVisitor/UserLoginIn.php index fe2945e..d228b82 100644 --- a/src/lib/Query/Common/CriterionVisitor/UserLoginIn.php +++ b/src/lib/Query/Common/CriterionVisitor/UserLoginIn.php @@ -25,7 +25,6 @@ public function canVisit(CriterionInterface $criterion): bool return in_array($criterion->operator ?? Operator::IN, [Operator::IN, Operator::EQ], true); } - /** * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\UserLogin $criterion */ diff --git a/src/lib/Query/Content/CriterionVisitor/SubtreeIn.php b/src/lib/Query/Content/CriterionVisitor/SubtreeIn.php index 55c003d..b668404 100644 --- a/src/lib/Query/Content/CriterionVisitor/SubtreeIn.php +++ b/src/lib/Query/Content/CriterionVisitor/SubtreeIn.php @@ -11,7 +11,6 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Operator; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Contracts\Solr\Query\CriterionVisitor; -use Ibexa\Core\Repository\Values\Content\Query\Criterion\PermissionSubtree; /** * Visits the Subtree criterion. diff --git a/src/lib/Query/Content/CriterionVisitor/Visibility.php b/src/lib/Query/Content/CriterionVisitor/Visibility.php index 7d1dba5..0511f99 100644 --- a/src/lib/Query/Content/CriterionVisitor/Visibility.php +++ b/src/lib/Query/Content/CriterionVisitor/Visibility.php @@ -33,6 +33,7 @@ public function canVisit(CriterionInterface $criterion) * @param \Ibexa\Contracts\Solr\Query\CriterionVisitor $subVisitor * @param \Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\Visibility $criterion + * * @return string */ public function visit(CriterionInterface $criterion, CriterionVisitor $subVisitor = null) diff --git a/src/lib/Query/Image/CriterionVisitor/AbstractImageRangeVisitor.php b/src/lib/Query/Image/CriterionVisitor/AbstractImageRangeVisitor.php index 7a7607b..9b5d639 100644 --- a/src/lib/Query/Image/CriterionVisitor/AbstractImageRangeVisitor.php +++ b/src/lib/Query/Image/CriterionVisitor/AbstractImageRangeVisitor.php @@ -8,7 +8,6 @@ namespace Ibexa\Solr\Query\Image\CriterionVisitor; -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Contracts\Solr\Query\CriterionVisitor; diff --git a/src/lib/Query/Image/CriterionVisitor/AbstractImageTermsVisitor.php b/src/lib/Query/Image/CriterionVisitor/AbstractImageTermsVisitor.php index fddb009..ce9984a 100644 --- a/src/lib/Query/Image/CriterionVisitor/AbstractImageTermsVisitor.php +++ b/src/lib/Query/Image/CriterionVisitor/AbstractImageTermsVisitor.php @@ -8,7 +8,6 @@ namespace Ibexa\Solr\Query\Image\CriterionVisitor; -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Contracts\Solr\Query\CriterionVisitor; diff --git a/src/lib/Query/Image/CriterionVisitor/AbstractImageVisitor.php b/src/lib/Query/Image/CriterionVisitor/AbstractImageVisitor.php index 4ce9836..1b46dd9 100644 --- a/src/lib/Query/Image/CriterionVisitor/AbstractImageVisitor.php +++ b/src/lib/Query/Image/CriterionVisitor/AbstractImageVisitor.php @@ -8,7 +8,6 @@ namespace Ibexa\Solr\Query\Image\CriterionVisitor; -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Contracts\Solr\Query\CriterionVisitor; use Ibexa\Core\Base\Exceptions\InvalidArgumentException;