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