Skip to content

Commit 87e0913

Browse files
committed
Typehint object parameters, closes #30.
1 parent 3ea504b commit 87e0913

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Cmfcmf/OpenWeatherMap/CurrentWeather.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ class CurrentWeather
8888
/**
8989
* Create a new weather object.
9090
*
91-
* @param $xml
92-
* @param string $units
91+
* @param \SimpleXMLElement $xml
92+
* @param string $units
9393
*
9494
* @internal
9595
*/
96-
public function __construct($xml, $units)
96+
public function __construct(\SimpleXMLElement $xml, $units)
9797
{
9898
$this->city = new City($xml->city['id'], $xml->city['name'], $xml->city->coord['lon'], $xml->city->coord['lat'], $xml->city->country);
9999
$this->temperature = new Temperature(new Unit($xml->temperature['value'], $xml->temperature['unit']), new Unit($xml->temperature['min'], $xml->temperature['unit']), new Unit($xml->temperature['max'], $xml->temperature['unit']));

Cmfcmf/OpenWeatherMap/Forecast.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Forecast extends CurrentWeather
4545
*
4646
* @internal
4747
*/
48-
public function __construct($xml, $units)
48+
public function __construct(\SimpleXMLElement $xml, $units)
4949
{
5050
$this->city = new City($xml->city['id'], $xml->city['name'], $xml->city->coord['lon'], $xml->city->coord['lat'], $xml->city->country);
5151

0 commit comments

Comments
 (0)