/** * @param Hotel $hotel */ public function addHotel($hotel) { $hotel->addRate($this); if (!$this->hotels->contains($hotel)) { $this->hotels->add($hotel); } return $this; }