$error =
new PromotionCartAddedInformationError($discountLineItem);
$calculated->
addErrors($error);
} /**
* function checks if the Original Cart contains the lineItem.
* if yes, an PromotionCartDeletedInformationError is set in the calculated cart
*/
private function addPromotionDeletedNotice(Cart
$original, Cart
$calculated, LineItem
$discountLineItem): void
{ if ($original->
has($discountLineItem->
getId())) { $error =
new PromotionCartDeletedInformationError($discountLineItem);
$calculated->
addErrors($error);
} }}