Skip to content

Commit d17148d

Browse files
cmfcmfStyleCIBot
authored andcommitted
Applied fixes from StyleCI
1 parent b51dbbf commit d17148d

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

Cmfcmf/OpenWeatherMap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public function getWeatherForecast($query, $units = 'imperial', $lang = 'en', $a
219219

220220
if ($days <= 5) {
221221
$answer = $this->getRawHourlyForecastData($query, $units, $lang, $appid, 'xml');
222-
} else if ($days <= 16) {
222+
} elseif ($days <= 16) {
223223
$answer = $this->getRawDailyForecastData($query, $units, $lang, $appid, 'xml', $days);
224224
} else {
225225
throw new \InvalidArgumentException('Error: forecasts are only available for the next 16 days. $days must be lower than 17.');
@@ -505,7 +505,7 @@ public function getRawWeatherHistory($query, \DateTime $start, $endOrCount = 1,
505505

506506
if ($endOrCount instanceof \DateTime) {
507507
$queryUrl .= "&end={$endOrCount->format('U')}";
508-
} else if (is_numeric($endOrCount) && $endOrCount > 0) {
508+
} elseif (is_numeric($endOrCount) && $endOrCount > 0) {
509509
$queryUrl .= "&cnt=$endOrCount";
510510
} else {
511511
throw new \InvalidArgumentException('$endOrCount must be either a \DateTime or a positive integer.');

Cmfcmf/OpenWeatherMap/Exception.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@
2323
*/
2424
class Exception extends \Exception
2525
{
26-
2726
}

Cmfcmf/OpenWeatherMap/Util/Unit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function getUnit()
8484
// Also, the API started to return "metric" as temperature unit recently. Also fix that.
8585
if ($this->unit == 'celsius' || $this->unit == 'metric') {
8686
return "&deg;C";
87-
} else if ($this->unit == 'fahrenheit') {
87+
} elseif ($this->unit == 'fahrenheit') {
8888
return 'F';
8989
} else {
9090
return $this->unit;

Cmfcmf/OpenWeatherMap/WeatherForecast.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function __construct($xml, $units, $days)
8888
// Make sure to only return the requested number of days.
8989
if ($days <= 5 && $counter == $days * 8) {
9090
break;
91-
} else if ($days > 5 && $counter == $days) {
91+
} elseif ($days > 5 && $counter == $days) {
9292
break;
9393
}
9494
}

0 commit comments

Comments
 (0)