Skip to content

Commit 870e328

Browse files
committed
Cleanup.
1 parent c6429e7 commit 870e328

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

Cmfcmf/OpenWeatherMap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class OpenWeatherMap
4040
*
4141
* @var string $copyright
4242
*/
43-
const COPYRIGHT = "Weather data from <a href=\"http://www.openweathermap.org\">OpenWeatherMap.org</a>";
43+
const COPYRIGHT = "Weather data from <a href=\"http://openweathermap.org\">OpenWeatherMap.org</a>";
4444

4545
/**
4646
* @var string The basic api url to fetch weather data from.
@@ -199,7 +199,7 @@ public function getWeather($query, $units = 'imperial', $lang = 'en', $appid = '
199199
* @throws OpenWeatherMap\Exception If OpenWeatherMap returns an error.
200200
* @throws \InvalidArgumentException If an argument error occurs.
201201
*
202-
* @return Array Array of CurrentWeather objects.
202+
* @return CurrentWeatherGroup
203203
*
204204
* @api
205205
*/

Cmfcmf/OpenWeatherMap/CurrentWeather.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@
1717

1818
namespace Cmfcmf\OpenWeatherMap;
1919

20-
use Cmfcmf\OpenWeatherMap;
2120
use Cmfcmf\OpenWeatherMap\Util\City;
2221
use Cmfcmf\OpenWeatherMap\Util\Sun;
2322
use Cmfcmf\OpenWeatherMap\Util\Temperature;
2423
use Cmfcmf\OpenWeatherMap\Util\Unit;
25-
use Cmfcmf\OpenWeatherMap\Util\Weather as WeatherObj;
24+
use Cmfcmf\OpenWeatherMap\Util\Weather;
2625
use Cmfcmf\OpenWeatherMap\Util\Wind;
2726

2827
/**
@@ -112,7 +111,7 @@ public function __construct($data, $units)
112111
$this->clouds = new Unit($data->clouds['value'], null, $data->clouds['name']);
113112
$this->precipitation = new Unit($data->precipitation['value'], $data->precipitation['unit'], $data->precipitation['mode']);
114113
$this->sun = new Sun(new \DateTime($data->city->sun['rise'], $utctz), new \DateTime($data->city->sun['set'], $utctz));
115-
$this->weather = new WeatherObj($data->weather['number'], $data->weather['value'], $data->weather['icon']);
114+
$this->weather = new Weather($data->weather['number'], $data->weather['value'], $data->weather['icon']);
116115
$this->lastUpdate = new \DateTime($data->lastupdate['value'], $utctz);
117116
} else {
118117
$this->city = new City($data->id, $data->name, $data->coord->lon, $data->coord->lat, $data->sys->country);
@@ -130,7 +129,7 @@ public function __construct($data, $units)
130129
$this->precipitation = new Unit($rainValue, $rainUnit);
131130

132131
$this->sun = new Sun(\DateTime::createFromFormat('U', $data->sys->sunrise, $utctz), \DateTime::createFromFormat('U', $data->sys->sunset, $utctz));
133-
$this->weather = new WeatherObj($data->weather[0]->id, $data->weather[0]->description, $data->weather[0]->icon);
132+
$this->weather = new Weather($data->weather[0]->id, $data->weather[0]->description, $data->weather[0]->icon);
134133
$this->lastUpdate = \DateTime::createFromFormat('U', $data->dt, $utctz);
135134
}
136135
}

Cmfcmf/OpenWeatherMap/Forecast.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
use Cmfcmf\OpenWeatherMap\Util\Temperature;
2121
use Cmfcmf\OpenWeatherMap\Util\Time;
2222
use Cmfcmf\OpenWeatherMap\Util\Unit;
23-
use Cmfcmf\OpenWeatherMap\Util\Weather as WeatherObj;
23+
use Cmfcmf\OpenWeatherMap\Util\Weather;
2424
use Cmfcmf\OpenWeatherMap\Util\Wind;
2525

2626
/**
@@ -65,7 +65,7 @@ public function __construct(\SimpleXMLElement $xml, $units)
6565
$this->wind = new Wind(new Unit($xml->windSpeed['mps'], $windSpeedUnit, $xml->windSpeed['name']), new Unit($xml->windDirection['deg'], $xml->windDirection['code'], $xml->windDirection['name']));
6666
$this->clouds = new Unit($xml->clouds['all'], $xml->clouds['unit'], $xml->clouds['value']);
6767
$this->precipitation = new Unit($xml->precipitation['value'], null, $xml->precipitation['type']);
68-
$this->weather = new WeatherObj($xml->symbol['number'], $xml->symbol['name'], $xml->symbol['var']);
68+
$this->weather = new Weather($xml->symbol['number'], $xml->symbol['name'], $xml->symbol['var']);
6969
$this->lastUpdate = new \DateTime($xml->lastupdate['value']);
7070

7171
if (isset($xml['from'])) {

0 commit comments

Comments
 (0)