Skip to content

Commit 0029cdc

Browse files
authored
ENGCOM-6964: Fix wrong type of argument appendSummaryFieldsToCollection #26755
2 parents 9674607 + 1643897 commit 0029cdc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

app/code/Magento/Review/Model/ResourceModel/Review/Summary.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ public function reAggregate($summary)
7979
* Append review summary fields to product collection
8080
*
8181
* @param \Magento\Catalog\Model\ResourceModel\Product\Collection $productCollection
82-
* @param string $storeId
82+
* @param int $storeId
8383
* @param string $entityCode
8484
* @return Summary
8585
* @throws \Magento\Framework\Exception\LocalizedException
8686
*/
8787
public function appendSummaryFieldsToCollection(
8888
\Magento\Catalog\Model\ResourceModel\Product\Collection $productCollection,
89-
string $storeId,
89+
int $storeId,
9090
string $entityCode
9191
) {
9292
if (!$productCollection->isLoaded()) {

app/code/Magento/Review/Observer/CatalogProductListCollectionAppendSummaryFieldsObserver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function execute(EventObserver $observer)
5353
$productCollection = $observer->getEvent()->getCollection();
5454
$this->sumResourceFactory->create()->appendSummaryFieldsToCollection(
5555
$productCollection,
56-
$this->storeManager->getStore()->getId(),
56+
(int)$this->storeManager->getStore()->getId(),
5757
\Magento\Review\Model\Review::ENTITY_PRODUCT_CODE
5858
);
5959

app/code/Magento/Review/Test/Unit/Observer/CatalogProductListCollectionAppendSummaryFieldsObserverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424
class CatalogProductListCollectionAppendSummaryFieldsObserverTest extends TestCase
2525
{
26-
private const STORE_ID = '1';
26+
private const STORE_ID = 1;
2727

2828
/**
2929
* @var Event|MockObject

0 commit comments

Comments
 (0)