mmainstreet /
jodel-web
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | class Location{ |
||
| 4 | |||
| 5 | public $cityName; |
||
| 6 | |||
| 7 | public $lat; |
||
| 8 | |||
| 9 | public $lng; |
||
| 10 | |||
| 11 | public function getCityName() |
||
| 12 | { |
||
| 13 | return $this->cityName; |
||
| 14 | } |
||
| 15 | |||
| 16 | public function setCityName($cityName) |
||
| 17 | { |
||
| 18 | $this->cityName = $cityName; |
||
| 19 | } |
||
| 20 | |||
| 21 | public function getLat() |
||
| 22 | { |
||
| 23 | return $this->lat; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function setLat($lat) |
||
| 27 | { |
||
| 28 | $this->lat = $lat; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function getLng() |
||
| 32 | { |
||
| 33 | return $this->lng; |
||
| 34 | } |
||
| 35 | |||
| 36 | public function setLng($lng) |
||
| 37 | { |
||
| 38 | $this->lng = $lng; |
||
| 39 | } |
||
| 40 | public function toArray(){ |
||
| 41 | return array( |
||
| 42 | "city" => $this->getCityName(), |
||
| 43 | "country" => 'DE', |
||
| 44 | "loc_accuracy" => '0.0', |
||
| 45 | "loc_coordinates" => array( |
||
| 46 | "lat" => $this->getLat(), |
||
| 47 | "lng" => $this->getLng(), |
||
| 48 | ), |
||
| 49 | "name" => $this->getCityName() |
||
| 50 | ); |
||
| 51 | } |
||
| 52 | } |
||
|
0 ignored issues
–
show
|
|||
| 53 |
This check marks files that end in a newline character, i.e. an empy line.