Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
lruozzi9 committed Oct 30, 2023
1 parent d790992 commit 203dcd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Product/Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,12 @@ public function reconcile(array $identifiersToReconcileWith): void

$product->setEnabled(false);

$this->dispatchPreEvent($productVariantIdentifierToDisable, 'product_variant', 'update');
$this->dispatchPreEvent($productVariantToDisable, 'product_variant', 'update');
$this->dispatchPreEvent($product, 'product', 'update');
// TODO We should handle $event->isStopped() where $event is the return value of the dispatchPreEvent method.
// See \Sylius\Bundle\ResourceBundle\Controller\ResourceController.
$this->productRepository->add($product);
$this->dispatchPostEvent($productVariantIdentifierToDisable, 'product_variant', 'update');
$this->dispatchPostEvent($productVariantToDisable, 'product_variant', 'update');
$this->dispatchPostEvent($product, 'product', 'update');
}
}
Expand Down

0 comments on commit 203dcd6

Please sign in to comment.