6 declare(strict_types=1);
22 private $configuration;
27 private $getStockItemConfiguration;
37 $this->getStockItemConfiguration = $getStockItemConfiguration;
44 public function execute(
string $sku,
int $stockId): bool
46 $stockItemConfiguration = $this->getStockItemConfiguration->execute($sku, $stockId);
48 $globalManageStock = $this->configuration->getManageStock();
51 $stockItemConfiguration->isUseConfigManageStock() == 1 &&
52 $globalManageStock == 1
54 $stockItemConfiguration->isUseConfigManageStock() == 0 &&
55 $stockItemConfiguration->isManageStock() == 1
execute(string $sku, int $stockId)
__construct(StockConfigurationInterface $configuration, GetStockItemConfigurationInterface $getStockItemConfiguration)