/** * @inheritdoc */ public function get($stockItemId) { $stockItem = $this->stockItemFactory->create(); $this->resource->load($stockItem, $stockItemId); if (!$stockItem->getItemId()) { throw new NoSuchEntityException(__('Stock Item with id "%1" does not exist.', $stockItemId)); } return $stockItem; }