Skip to content

Commit 0da54ae

Browse files
committed
IBX-9727: Applied review remarks
1 parent a5e4573 commit 0da54ae

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

src/bundle/ApiLoader/BoostFactorProviderFactory.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
*/
1717
readonly class BoostFactorProviderFactory
1818
{
19+
/**
20+
* @param class-string<\Ibexa\Solr\FieldMapper\BoostFactorProvider> $boostFactorProviderClass
21+
*/
1922
public function __construct(
2023
private ContainerInterface $container,
2124
private RepositoryConfigurationProviderInterface $repositoryConfigurationProvider,
@@ -33,9 +36,8 @@ public function buildService(): BoostFactorProvider
3336
$connection = $repositoryConfig['search']['connection'];
3437
}
3538

36-
/** @var \Ibexa\Solr\FieldMapper\BoostFactorProvider */
3739
return new $this->boostFactorProviderClass(
38-
$this->container->getParameter(
40+
(array)$this->container->getParameter(
3941
"ibexa.solr.connection.{$connection}.boost_factor_map_id"
4042
)
4143
);

src/bundle/ApiLoader/IndexingDepthProviderFactory.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
readonly class IndexingDepthProviderFactory
1616
{
17+
/**
18+
* @param class-string<\Ibexa\Solr\FieldMapper\IndexingDepthProvider> $indexingDepthProviderClass
19+
*/
1720
public function __construct(
1821
private ContainerInterface $container,
1922
private RepositoryConfigurationProviderInterface $repositoryConfigurationProvider,
@@ -31,12 +34,11 @@ public function buildService(): IndexingDepthProvider
3134
$connection = $repositoryConfig['search']['connection'];
3235
}
3336

34-
/** @var \Ibexa\Solr\FieldMapper\IndexingDepthProvider */
3537
return new $this->indexingDepthProviderClass(
36-
$this->container->getParameter(
38+
(array)$this->container->getParameter(
3739
"ibexa.solr.connection.{$connection}.indexing_depth.map"
3840
),
39-
$this->container->getParameter(
41+
(int)$this->container->getParameter(
4042
"ibexa.solr.connection.{$connection}.indexing_depth.default"
4143
)
4244
);

src/bundle/ApiLoader/SolrEngineFactory.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
readonly class SolrEngineFactory
1818
{
19+
/**
20+
* @param class-string<\Ibexa\Solr\Handler> $searchEngineClass
21+
*/
1922
public function __construct(
2023
private RepositoryConfigurationProviderInterface $repositoryConfigurationProvider,
2124
private string $defaultConnection,
@@ -38,7 +41,6 @@ public function buildEngine(): \Ibexa\Solr\Handler
3841
$gateway = $this->gatewayRegistry->getGateway($connection);
3942
$coreFilter = $this->coreFilterRegistry->getCoreFilter($connection);
4043

41-
/** @var \Ibexa\Solr\Handler */
4244
return new $this->searchEngineClass(
4345
$gateway,
4446
$this->contentHandler,

src/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ private function doMapRelatedFields(Content $sourceContent, $languageCode, $maxD
137137
);
138138

139139
$relatedContents = $this->contentHandler->loadContentList(
140-
array_map(static fn (Content\Relation $relation) => $relation->destinationContentId, $relations)
140+
array_map(static fn (Content\Relation $relation): int => $relation->destinationContentId, $relations)
141141
);
142142

143143
$contentTypes = $this->contentTypeHandler->loadContentTypeList(
144-
array_map(static fn (Content $content) => $content->versionInfo->contentInfo->contentTypeId, $relatedContents)
144+
array_map(static fn (Content $content): int => $content->versionInfo->contentInfo->contentTypeId, $relatedContents)
145145
);
146146

147147
$fields = [];

0 commit comments

Comments
 (0)