private function getNonPromotionLineItems(Cart $cart): array
    {
        $lineItems = array_filter(
            $cart->getLineItems()->getElements(),
            function (LineItem $lineItem) {
                return $lineItem->getType() !== $this->promotionLineItemPlaceholder;
            }
        );

        return $lineItems;
    }
private function getNonPromotionLineItems(Cart $cart): array
    {
        $lineItems = array_filter(
            $cart->getLineItems()->getElements(),
            function (LineItem $lineItem) {
                return $lineItem->getType() !== $this->promotionLineItemPlaceholder;
            }
        );

        return $lineItems;
    }
private function getNonPromotionLineItems ( Cart $ cart ) : array { $ lineItems = array_filter ( $ cart -> getLineItems ( ) -> getElements ( ) , function ( LineItem $ lineItem ) { return $ lineItem -> getType ( ) !== $ this -> promotionLineItemPlaceholder ; } ) ; return $ lineItems ; }
Gets all line items that are not of the provided type
These can be used to iterate through all "standard" items.
Gets all line items that are not of the provided type These can be used to iterate through all standard items .