public function removeCart() { if ($this->cart !== null) { $cart = $this->cart; $this->cart = null; $cart->removeCustomer(); } }