diff --git a/code_samples/search/elasticsearch/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php b/code_samples/search/elasticsearch/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php index 62e4d4f495..862bd94bf4 100644 --- a/code_samples/search/elasticsearch/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php +++ b/code_samples/search/elasticsearch/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php @@ -4,18 +4,18 @@ namespace App\Query\Criterion\Elasticsearch; -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Contracts\Elasticsearch\Query\CriterionVisitor; use Ibexa\Contracts\Elasticsearch\Query\LanguageFilter; final class CameraManufacturerVisitor implements CriterionVisitor { - public function supports(Criterion $criterion, LanguageFilter $languageFilter): bool + public function supports(CriterionInterface $criterion, LanguageFilter $languageFilter): bool { return $criterion instanceof CameraManufacturerCriterion; } - public function visit(CriterionVisitor $dispatcher, Criterion $criterion, LanguageFilter $languageFilter): array + public function visit(CriterionVisitor $dispatcher, CriterionInterface $criterion, LanguageFilter $languageFilter): array { return [ 'terms' => [ diff --git a/code_samples/search/solr/src/Query/Criterion/Solr/CameraManufacturerVisitor.php b/code_samples/search/solr/src/Query/Criterion/Solr/CameraManufacturerVisitor.php index c5ae4bacfd..7d7f4f81be 100644 --- a/code_samples/search/solr/src/Query/Criterion/Solr/CameraManufacturerVisitor.php +++ b/code_samples/search/solr/src/Query/Criterion/Solr/CameraManufacturerVisitor.php @@ -4,17 +4,17 @@ namespace App\Query\Criterion\Solr; -use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; +use Ibexa\Contracts\Core\Repository\Values\Content\Query\CriterionInterface; use Ibexa\Contracts\Solr\Query\CriterionVisitor; final class CameraManufacturerVisitor extends CriterionVisitor { - public function canVisit(Criterion $criterion) + public function canVisit(CriterionInterface $criterion) { return $criterion instanceof CameraManufacturerCriterion; } - public function visit(Criterion $criterion, CriterionVisitor $subVisitor = null) + public function visit(CriterionInterface $criterion, CriterionVisitor $subVisitor = null) { $expressions = array_map( function ($value): string {