Skip to content

Commit 8e5407a

Browse files
committed
Fix PHPStan errors (#2610)
* Fix errors found by PHPStan * code_samples_usage.php: Tri more visible 'highlighted line' marker
1 parent e89917c commit 8e5407a

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

code_samples/search/custom/src/EventSubscriber/CustomQueryFilterSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\LogicalAnd;
88
use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion\ObjectStateIdentifier;
9-
use Ibexa\Contracts\ElasticSearch\Query\Event\QueryFilterEvent;
9+
use Ibexa\Contracts\Elasticsearch\Query\Event\QueryFilterEvent;
1010
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
1111

1212
final class CustomQueryFilterSubscriber implements EventSubscriberInterface

code_samples/search/custom/src/Query/Aggregation/Elasticsearch/PriorityRangeAggregationVisitor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ public function supports(Aggregation $aggregation, LanguageFilter $languageFilte
1818

1919
/**
2020
* @param \App\Query\Aggregation\PriorityRangeAggregation $aggregation
21+
*
22+
* @return array<string, array<string, mixed>>
2123
*/
2224
public function visit(AggregationVisitor $dispatcher, Aggregation $aggregation, LanguageFilter $languageFilter): array
2325
{

tools/code_samples/code_samples_usage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function displayBlocks(array $docFileBlocks, string $docFilePath = null, $lineOf
3535
try {
3636
$blockContents = getBlockContents($block);
3737
foreach ($blockContents['contents'] as $contentLineNumber => $contentLine) {
38-
$prefixedBlockContentLines[] = str_pad($contentLineNumber, 3, 0, STR_PAD_LEFT) . (in_array($contentLineNumber, $blockContents['highlights']) ? '' : '') . $contentLine;
38+
$prefixedBlockContentLines[] = str_pad($contentLineNumber, 3, 0, STR_PAD_LEFT) . (in_array($contentLineNumber, $blockContents['highlights']) ? '❇️' : '') . $contentLine;
3939
}
4040
echo implode(PHP_EOL, $prefixedBlockContentLines) . PHP_EOL . PHP_EOL;
4141
} catch (Exception $exception) {

0 commit comments

Comments
 (0)