Skip to content

Commit 3f901e2

Browse files
authored
Return the same data on exit
Function `correctItemsQty` returns $this in case of input argument `$items` is empty or nothing otherwise. I suppose return value should be the same in the both cases - $this or nothing.
1 parent 29d72c0 commit 3f901e2

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/CatalogInventory/Model/ResourceModel

1 file changed

+1
-1
lines changed

app/code/Magento/CatalogInventory/Model/ResourceModel/Stock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function lockProductsStock($productIds, $websiteId)
140140
public function correctItemsQty(array $items, $websiteId, $operator)
141141
{
142142
if (empty($items)) {
143-
return $this;
143+
return;
144144
}
145145

146146
$connection = $this->getConnection();

0 commit comments

Comments
 (0)