public function sellCar(Persons $buyer) { $currentCar = $this->nextCar(); if ($buyer->buyCar($currentCar)) { $currentCar->setOwner($buyer); $this->removeCar($currentCar); } }