Skip to content

Commit 9c3278a

Browse files
author
Mike Weis
committed
MAGETWO-28252: Catalog Inventory Integration API
- fix static failure - fix REST and SOAP failures
1 parent 034a086 commit 9c3278a

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

app/code/Magento/CatalogInventory/Api/Data/StockItemInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ interface StockItemInterface extends ExtensibleDataInterface
5555
const CUSTOMER_GROUP_ID = 'customer_group_id';
5656

5757
/**
58-
* @return int
58+
* @return int|null
5959
*/
6060
public function getItemId();
6161

@@ -66,7 +66,7 @@ public function getItemId();
6666
public function setItemId($itemId);
6767

6868
/**
69-
* @return int
69+
* @return int|null
7070
*/
7171
public function getProductId();
7272

@@ -79,7 +79,7 @@ public function setProductId($productId);
7979
/**
8080
* Retrieve Website Id
8181
*
82-
* @return int
82+
* @return int|null
8383
*/
8484
public function getWebsiteId();
8585

@@ -94,7 +94,7 @@ public function setWebsiteId($websiteId);
9494
/**
9595
* Retrieve stock identifier
9696
*
97-
* @return int
97+
* @return int|null
9898
*/
9999
public function getStockId();
100100

app/code/Magento/CatalogInventory/Model/Plugin/AfterProductLoad.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function __construct(
3737
* @param \Magento\Catalog\Model\Product $product
3838
* @return \Magento\Catalog\Model\Product
3939
*/
40-
public function afterLoad($product)
40+
public function afterLoad(\Magento\Catalog\Model\Product $product)
4141
{
4242
$productExtension = $product->getExtensionAttributes();
4343
if ($productExtension === null) {

app/code/Magento/CatalogInventory/Model/StockRegistry.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,7 @@ public function updateStockItemBySku($productSku, \Magento\CatalogInventory\Api\
185185
$origStockItem = $this->getStockItem($productId, $websiteId);
186186
$data = $stockItem->getData();
187187
if ($origStockItem->getItemId()) {
188-
if (isset($data['item_id'])) {
189-
unset($data['item_id']);
190-
}
188+
unset($data['item_id']);
191189
}
192190
$origStockItem->addData($data);
193191
$origStockItem->setProductId($productId);

0 commit comments

Comments
 (0)