/** * {@inheritdoc} */ public function revert(PromotionSubjectInterface $subject, array $configuration, PromotionInterface $promotion) { if (!$subject instanceof OrderInterface && !$subject instanceof OrderItemInterface) { throw new UnexpectedTypeException($subject, 'Sylius\\Component\\Core\\Model\\OrderInterface or Sylius\\Component\\Core\\Model\\OrderItemInterface'); } $subject->removePromotionAdjustments(); }