Skip to content

Commit

Permalink
ENGCOM-6964: Fix wrong type of argument appendSummaryFieldsToCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
slavvka committed Feb 25, 2020
2 parents 9674607 + 1643897 commit 0029cdc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ public function reAggregate($summary)
* Append review summary fields to product collection
*
* @param \Magento\Catalog\Model\ResourceModel\Product\Collection $productCollection
* @param string $storeId
* @param int $storeId
* @param string $entityCode
* @return Summary
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function appendSummaryFieldsToCollection(
\Magento\Catalog\Model\ResourceModel\Product\Collection $productCollection,
string $storeId,
int $storeId,
string $entityCode
) {
if (!$productCollection->isLoaded()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function execute(EventObserver $observer)
$productCollection = $observer->getEvent()->getCollection();
$this->sumResourceFactory->create()->appendSummaryFieldsToCollection(
$productCollection,
$this->storeManager->getStore()->getId(),
(int)$this->storeManager->getStore()->getId(),
\Magento\Review\Model\Review::ENTITY_PRODUCT_CODE
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*/
class CatalogProductListCollectionAppendSummaryFieldsObserverTest extends TestCase
{
private const STORE_ID = '1';
private const STORE_ID = 1;

/**
* @var Event|MockObject
Expand Down

0 comments on commit 0029cdc

Please sign in to comment.