public function create() { $geoname = $this->getRandomGeoname(); $restaurant = new Restaurant(); $restaurant->setWebsite('http://www.google.com'); $restaurant->setAddress($this->getRandomAddress()); $restaurant->setLat($this->getRandomLat($geoname)); $restaurant->setLng($this->getRandomLng($geoname)); $restaurant->setAverageCost(rand(0, 200)); $restaurant->setName($this->getRandomName()); $restaurant->setCuisine($this->getRandomCuisine()); $restaurant->setGeoname($geoname); $restaurant->setPhone('04422556677'); $restaurant->setPicture(null); $restaurant->setThumb(null); return $restaurant; }
/** * @param Restaurant $restaurant * @param $venue */ protected function setPrice(Restaurant $restaurant, $venue) { if (isset($venue['price']) && isset($venue['price']['tier'])) { $tier = $venue['price']['tier']; $restaurant->setAverageCost($this->prices[$tier]); } }