public function removeCity(City $city) { if ($city->getName() === $this->getCity()->getName()) { $this->livesIn = null; } }