17
17
18
18
namespace Cmfcmf \OpenWeatherMap ;
19
19
20
- use Cmfcmf \OpenWeatherMap ;
21
20
use Cmfcmf \OpenWeatherMap \Util \City ;
22
21
use Cmfcmf \OpenWeatherMap \Util \Sun ;
23
22
use Cmfcmf \OpenWeatherMap \Util \Temperature ;
24
23
use Cmfcmf \OpenWeatherMap \Util \Unit ;
25
- use Cmfcmf \OpenWeatherMap \Util \Weather as WeatherObj ;
24
+ use Cmfcmf \OpenWeatherMap \Util \Weather ;
26
25
use Cmfcmf \OpenWeatherMap \Util \Wind ;
27
26
28
27
/**
@@ -112,7 +111,7 @@ public function __construct($data, $units)
112
111
$ this ->clouds = new Unit ($ data ->clouds ['value ' ], null , $ data ->clouds ['name ' ]);
113
112
$ this ->precipitation = new Unit ($ data ->precipitation ['value ' ], $ data ->precipitation ['unit ' ], $ data ->precipitation ['mode ' ]);
114
113
$ 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 ' ]);
116
115
$ this ->lastUpdate = new \DateTime ($ data ->lastupdate ['value ' ], $ utctz );
117
116
} else {
118
117
$ 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)
130
129
$ this ->precipitation = new Unit ($ rainValue , $ rainUnit );
131
130
132
131
$ 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 );
134
133
$ this ->lastUpdate = \DateTime::createFromFormat ('U ' , $ data ->dt , $ utctz );
135
134
}
136
135
}
0 commit comments