protected function checkIfCartIsValid(UserInterface $user, ApiOrderInterface $cart, $locale)
    {
        if (count($cart->getItems()) < 1) {
            throw new OrderException('Empty Cart');
        }
    }
protected function checkIfCartIsValid(UserInterface $user, ApiOrderInterface $cart, $locale)
    {
        if (count($cart->getItems()) < 1) {
            throw new OrderException('Empty Cart');
        }
    }
protected function checkIfCartIsValid ( UserInterface $ user , ApiOrderInterface $ cart , $ locale ) { if ( count ( $ cart -> getItems ( ) ) < 1 ) { throw new OrderException ( 'Empty Cart' ) ; } }
Checks if cart is valid

@param UserInterface $user
@param ApiOrderInterface $cart
@param string $locale

@throws OrderException
Checks if cart is valid