public function validateEmptyShippingAmount(CartInterface $cart)
    {
        $shippingAmount = $cart->getShippingAmount();
        if (!($shippingAmount instanceof MoneyInterface)) {
            $cart
                ->setShippingAmount(
                    $this
                        ->emptyMoneyWrapper
                        ->get()
                );
        }
    }
public function validateEmptyShippingAmount(CartInterface $cart)
    {
        $shippingAmount = $cart->getShippingAmount();
        if (!($shippingAmount instanceof MoneyInterface)) {
            $cart
                ->setShippingAmount(
                    $this
                        ->emptyMoneyWrapper
                        ->get()
                );
        }
    }
public function validateEmptyShippingAmount ( CartInterface $ cart ) { $ shippingAmount = $ cart -> getShippingAmount ( ) ; if ( ! ( $ shippingAmount instanceof MoneyInterface ) ) { $ cart -> setShippingAmount ( $ this -> emptyMoneyWrapper -> get ( ) ) ; } }
If the cart's shipping amount is not defined, then put an empty Money
value.

@param CartInterface $cart Cart
If the cart s shipping amount is not defined then put an empty Money value .