Skip to content

Commit d2b0fb3

Browse files
committed
Replace '°C' by °C
1 parent 05a995c commit d2b0fb3

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Cmfcmf/OpenWeatherMap/Forecast.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function __construct(\SimpleXMLElement $xml, $units)
4646
$utctz = new \DateTimeZone('UTC');
4747

4848
if ($units == 'metric') {
49-
$temperatureUnit = "°C";
49+
$temperatureUnit = "°C";
5050
} else {
5151
$temperatureUnit = 'F';
5252
}

Cmfcmf/OpenWeatherMap/Util/Unit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function getUnit()
8383
// Units are inconsistent. Only celsius and fahrenheit are not abbreviated. This check fixes that.
8484
// Also, the API started to return "metric" as temperature unit recently. Also fix that.
8585
if ($this->unit == 'celsius' || $this->unit == 'metric') {
86-
return "°C";
86+
return "°C";
8787
} elseif ($this->unit == 'fahrenheit') {
8888
return 'F';
8989
} else {

tests/OpenWeatherMapTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function testGetWeatherForecast()
114114
{
115115
$days = 1;
116116
$defaultDay = $this->owm->getWeatherForecast('Berlin', 'imperial', 'en', '', $days);
117-
117+
118118
$days = 16;
119119
$maxDay = $this->owm->getWeatherForecast('Berlin', 'imperial', 'en', '', $days);
120120

@@ -172,7 +172,7 @@ public function testCached()
172172
$weather = new OpenWeatherMap($this->apiKey, new TestFetcher(), $cache, 600);
173173
$currWeatherData = $weather->getRawWeatherData('Berlin', 'imperial', 'en', $this->apiKey, 'xml');
174174
$cachedWeatherData = $weather->getRawWeatherData('Berlin', 'imperial', 'en', $this->apiKey, 'xml');
175-
175+
176176
$this->assertInternalType('string', $currWeatherData);
177177
$this->assertInternalType('string', $cachedWeatherData);
178178
}

tests/Util/UnitTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ public function testCelsiusFix()
100100
{
101101
$this->givenThereIsAUnitWithUnit("celsius");
102102

103-
$this->assertSame("°C", $this->unit->getUnit());
103+
$this->assertSame("°C", $this->unit->getUnit());
104104
}
105105

106106
public function testMetricFix()
107107
{
108108
$this->givenThereIsAUnitWithUnit("metric");
109109

110-
$this->assertSame("°C", $this->unit->getUnit());
110+
$this->assertSame("°C", $this->unit->getUnit());
111111
}
112112

113113
public function testFahrenheitFix()

0 commit comments

Comments
 (0)