Skip to content

Commit fd923d7

Browse files
committed
remove the isset history['city']
1 parent 4d37a92 commit fd923d7

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

Cmfcmf/OpenWeatherMap/WeatherHistory.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ public function __construct($weatherHistory, $query)
7575

7676
$utctz = new \DateTimeZone('UTC');
7777
foreach ($weatherHistory['list'] as $history) {
78-
if (isset($history['city'])) {
79-
continue;
80-
}
8178
if (isset($history['rain'])) {
8279
$units = array_keys($history['rain']);
8380
} else {

tests/OpenWeatherMap/WeatherHistoryTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,6 @@ public function testJsonHasCountryAndPopulation()
109109
"cod":"200","calctime":"123456789","message":0.0032,"city_id":{"id":1851632,"name":"Shuzenji","coord":{"lon":138.933334,"lat":34.966671},"country":"JP"},
110110
"cnt":10,
111111
"list":[{
112-
"city":{
113-
"country": "Berlin",
114-
"population": "10,000"
115-
}
116-
},{
117112
"dt":1406080800,
118113
"temp":{
119114
"day":297.77,
@@ -146,11 +141,6 @@ public function testJsonWithRainKey()
146141
"cod":"200","calctime":"123456789","message":0.0032,"city_id":{"id":1851632,"name":"Shuzenji","coord":{"lon":138.933334,"lat":34.966671},"country":"JP"},
147142
"cnt":10,
148143
"list":[{
149-
"city":{
150-
"country": "Berlin",
151-
"population": "10,000"
152-
}
153-
},{
154144
"dt":1406080800,
155145
"temp":{
156146
"day":297.77,

0 commit comments

Comments
 (0)