1717
1818namespace Cmfcmf \OpenWeatherMap ;
1919
20- use Cmfcmf \OpenWeatherMap ;
2120use Cmfcmf \OpenWeatherMap \Util \City ;
2221use Cmfcmf \OpenWeatherMap \Util \Sun ;
2322use Cmfcmf \OpenWeatherMap \Util \Temperature ;
2423use Cmfcmf \OpenWeatherMap \Util \Unit ;
25- use Cmfcmf \OpenWeatherMap \Util \Weather as WeatherObj ;
24+ use Cmfcmf \OpenWeatherMap \Util \Weather ;
2625use 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 }
0 commit comments