marketplaceStockRepository = $marketplaceStockRepository; $this->marketplaceProductRepository = $marketplaceProductRepository; $this->facturisStockRepository = $facturisStockRepository; $this->settingsRepository = $settingsRepository; } public function sync() { $this->facturisStockRepository->setOptionStockFilter($this->settingsRepository->getOptionStockFilter()); $this->facturisStockRepository->setLocalProducts($this->marketplaceProductRepository->getAll()); $facturisStock = $this->facturisStockRepository->getAll(); $this->marketplaceStockRepository->setStockLocations($this->settingsRepository->getOptionLocations()); $this->marketplaceStockRepository->setLocalProducts($this->marketplaceProductRepository->getAll()); $this->marketplaceStockRepository->update($facturisStock); } }