Skip to content

Commit 6c444d7

Browse files
committed
A bit of formatting.
1 parent 5458e0c commit 6c444d7

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

Cmfcmf/OpenWeatherMap.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,6 @@ public function getRawWeatherData($query, $units = 'imperial', $lang = 'en', $ap
336336
*
337337
* @return string Returns false on failure and the fetched data in the format you specified on success.
338338
*
339-
* Warning: If an error occurs, OpenWeatherMap ALWAYS returns json data.
340-
*
341339
* @api
342340
*/
343341
public function getRawWeatherGroupData($ids, $units = 'imperial', $lang = 'en', $appid = '')
@@ -564,9 +562,7 @@ private function parseXML($answer)
564562
private function parseJson($answer)
565563
{
566564
$json = json_decode($answer);
567-
568-
if (json_last_error() !== JSON_ERROR_NONE)
569-
{
565+
if (json_last_error() !== JSON_ERROR_NONE) {
570566
throw new OWMException('OpenWeatherMap returned an invalid json object: ' . json_last_error_msg());
571567
}
572568

Cmfcmf/OpenWeatherMap/CurrentWeather.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ public function __construct($data, $units)
114114
$this->sun = new Sun(new \DateTime($data->city->sun['rise'], $utctz), new \DateTime($data->city->sun['set'], $utctz));
115115
$this->weather = new WeatherObj($data->weather['number'], $data->weather['value'], $data->weather['icon']);
116116
$this->lastUpdate = new \DateTime($data->lastupdate['value'], $utctz);
117-
118117
} else {
119118
$this->city = new City($data->id, $data->name, $data->coord->lon, $data->coord->lat, $data->sys->country);
120119
$this->temperature = new Temperature(new Unit($data->main->temp, $units), new Unit($data->main->temp_min, $units), new Unit($data->main->temp_max, $units));
@@ -135,5 +134,4 @@ public function __construct($data, $units)
135134
$this->lastUpdate = \DateTime::createFromFormat('U', $data->dt, $utctz);
136135
}
137136
}
138-
139137
}

0 commit comments

Comments
 (0)