private function addPromotionNotFoundError(string
$code, Cart
$cart): void
{ $cart->
addErrors(new PromotionNotFoundError($code));
} /**
* Adds a new error to the cart if the promotion has been found
* but somehow is not eligible for the current cart.
*/
private function addPromotionNotEligibleError(string
$name, Cart
$cart): void
{ $cart->
addErrors(new PromotionNotEligibleError($name));
} /**
* 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;
}