From 0787add4d01ee9f3176a3da8a1dc364214d52df9 Mon Sep 17 00:00:00 2001 From: Valeriy Nayda Date: Fri, 8 Dec 2017 18:02:06 +0200 Subject: [PATCH] MSI: Merge mainline -- fix types --- app/code/Magento/Inventory/Model/Source/Command/Save.php | 2 +- app/code/Magento/Inventory/Model/Stock/Command/Save.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Inventory/Model/Source/Command/Save.php b/app/code/Magento/Inventory/Model/Source/Command/Save.php index 6fc3ee43adf7..f053df7b41a8 100644 --- a/app/code/Magento/Inventory/Model/Source/Command/Save.php +++ b/app/code/Magento/Inventory/Model/Source/Command/Save.php @@ -62,7 +62,7 @@ public function execute(SourceInterface $source): int try { $this->sourceResource->save($source); - return $source->getSourceId(); + return (int)$source->getSourceId(); } catch (\Exception $e) { $this->logger->error($e->getMessage()); throw new CouldNotSaveException(__('Could not save Source'), $e); diff --git a/app/code/Magento/Inventory/Model/Stock/Command/Save.php b/app/code/Magento/Inventory/Model/Stock/Command/Save.php index 4856603c32b8..24e808c7c1db 100644 --- a/app/code/Magento/Inventory/Model/Stock/Command/Save.php +++ b/app/code/Magento/Inventory/Model/Stock/Command/Save.php @@ -61,7 +61,7 @@ public function execute(StockInterface $stock): int try { $this->stockResource->save($stock); - return $stock->getStockId(); + return (int)$stock->getStockId(); } catch (\Exception $e) { $this->logger->error($e->getMessage()); throw new CouldNotSaveException(__('Could not save Stock'), $e);