/**
* function checks if the Original Cart contains the lineItem.
* if not, an PromotionCartAddedInformationError is set in the calculated cart
*/
private function addPromotionAddedNotice(Cart
$original, Cart
$calculated, LineItem
$discountLineItem): void
{ if ($original->
has($discountLineItem->
getId())) { return;
} $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);