diff --git a/code_samples/search/custom/src/EventSubscriber/CustomQueryFilterSubscriber.php b/code_samples/search/custom/src/EventSubscriber/CustomQueryFilterSubscriber.php index fbe91a3be3..3fe41cd3b1 100644 --- a/code_samples/search/custom/src/EventSubscriber/CustomQueryFilterSubscriber.php +++ b/code_samples/search/custom/src/EventSubscriber/CustomQueryFilterSubscriber.php @@ -6,7 +6,7 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd; use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ObjectStateIdentifier; -use Ibexa\Contracts\ElasticSearch\Query\Event\QueryFilterEvent; +use Ibexa\Contracts\Elasticsearch\Query\Event\QueryFilterEvent; use Symfony\Component\EventDispatcher\EventSubscriberInterface; final class CustomQueryFilterSubscriber implements EventSubscriberInterface diff --git a/code_samples/search/custom/src/Query/Aggregation/Elasticsearch/PriorityRangeAggregationVisitor.php b/code_samples/search/custom/src/Query/Aggregation/Elasticsearch/PriorityRangeAggregationVisitor.php index 36c5b2b800..f2d0acfb1e 100644 --- a/code_samples/search/custom/src/Query/Aggregation/Elasticsearch/PriorityRangeAggregationVisitor.php +++ b/code_samples/search/custom/src/Query/Aggregation/Elasticsearch/PriorityRangeAggregationVisitor.php @@ -18,6 +18,8 @@ public function supports(Aggregation $aggregation, LanguageFilter $languageFilte /** * @param \App\Query\Aggregation\PriorityRangeAggregation $aggregation + * + * @return array> */ public function visit(AggregationVisitor $dispatcher, Aggregation $aggregation, LanguageFilter $languageFilter): array { diff --git a/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php b/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php index 4f715c5241..6685606ec6 100644 --- a/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php +++ b/code_samples/search/custom/src/Query/Criterion/Elasticsearch/CameraManufacturerVisitor.php @@ -17,7 +17,7 @@ public function supports(Criterion $criterion, LanguageFilter $languageFilter): } /** - * @param \App\Query\Criterion\Elasticsearch\CameraManufacturerCriterion $criterion + * @param \App\Query\Criterion\CameraManufacturerCriterion $criterion */ public function visit(CriterionVisitor $dispatcher, Criterion $criterion, LanguageFilter $languageFilter): array { diff --git a/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php b/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php index 1c73affd7e..6d4b7fb89d 100644 --- a/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php +++ b/code_samples/search/custom/src/Query/Criterion/Solr/CameraManufacturerVisitor.php @@ -16,7 +16,7 @@ public function canVisit(Criterion $criterion) } /** - * @param \App\Query\Criterion\Solr\CameraManufacturerCriterion $criterion + * @param \App\Query\Criterion\CameraManufacturerCriterion $criterion */ public function visit(Criterion $criterion, CriterionVisitor $subVisitor = null) { diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index bd99b11401..427c3cab5e 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -355,11 +355,6 @@ parameters: count: 1 path: code_samples/search/custom/src/Query/Aggregation/Elasticsearch/PriorityRangeAggregationResultExtractor.php - - - message: "#^Method App\\\\Query\\\\Aggregation\\\\Elasticsearch\\\\PriorityAggregationVisitor\\:\\:visit\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: code_samples/search/elasticsearch/src/Query/Aggregation/Elasticsearch/PriorityAggregationVisitor.php - - message: "#^Method App\\\\Query\\\\Criterion\\\\Elasticsearch\\\\CameraManufacturerVisitor\\:\\:visit\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 diff --git a/tools/code_samples/code_samples_usage.php b/tools/code_samples/code_samples_usage.php index 66cd8a1ebe..1fd34604b6 100644 --- a/tools/code_samples/code_samples_usage.php +++ b/tools/code_samples/code_samples_usage.php @@ -35,7 +35,7 @@ function displayBlocks(array $docFileBlocks, string $docFilePath = null, $lineOf try { $blockContents = getBlockContents($block); foreach ($blockContents['contents'] as $contentLineNumber => $contentLine) { - $prefixedBlockContentLines[] = str_pad($contentLineNumber, 3, 0, STR_PAD_LEFT) . (in_array($contentLineNumber, $blockContents['highlights']) ? '⫸' : '⫶') . $contentLine; + $prefixedBlockContentLines[] = str_pad($contentLineNumber, 3, 0, STR_PAD_LEFT) . (in_array($contentLineNumber, $blockContents['highlights']) ? '❇️' : '⫶') . $contentLine; } echo implode(PHP_EOL, $prefixedBlockContentLines) . PHP_EOL . PHP_EOL; } catch (Exception $exception) {