Cart/Provider/AbstractCartProvider.php
public function clearCart()
    {
        if (!$this->hasCart() || $this->cart->isLocked()) {
            return $this;
        }

        if (null !== $this->cart->getId()) {
            $this->cartOperator->delete($this->cart, true);
        }

        $this->cart = null;

        return $this;
    }
public function clearCart()
    {
        if (!$this->hasCart() || $this->cart->isLocked()) {
            return $this;
        }

        if (null !== $this->cart->getId()) {
            $this->cartOperator->delete($this->cart, true);
        }

        $this->cart = null;

        return $this;
    }
{@inheritdoc}