Completed
Push — master ( bfdada...45e4b7 )
by Martin
02:27
created
src/WeatherAPI/WeatherJSONModel.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $json = [];
70 70
 
71 71
         // Initialize CURL:
72
-        $curlHeader = curl_init('http://api.ipstack.com/'. $ipAdress . '?access_key=' . $this->apikey1 . '');
72
+        $curlHeader = curl_init('http://api.ipstack.com/' . $ipAdress . '?access_key=' . $this->apikey1 . '');
73 73
         curl_setopt($curlHeader, CURLOPT_RETURNTRANSFER, true);
74 74
 
75 75
         // Store the data:
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $location = $coords["lat"] . ',' . $coords["long"];
98 98
 
99 99
         // Initialize CURL:
100
-        $curlHeader = curl_init('https://api.darksky.net/forecast/'.$this->apikey2.'/'.$location.'?exclude=minutely,hourly,currently,alerts,flags&extend=daily&lang=sv&units=ca');
100
+        $curlHeader = curl_init('https://api.darksky.net/forecast/' . $this->apikey2 . '/' . $location . '?exclude=minutely,hourly,currently,alerts,flags&extend=daily&lang=sv&units=ca');
101 101
         curl_setopt($curlHeader, CURLOPT_RETURNTRANSFER, true);
102 102
 
103 103
         // Store the data:
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         $location = $coords["lat"] . ',' . $coords["long"];
160 160
         for ($i = 0; $i < $days; $i++) {
161 161
             $time = $this->getDayFormat("$i");
162
-            $urls[] = 'https://api.darksky.net/forecast/'.$this->apikey2.'/'.$location.','.$time.'?exclude=minutely,hourly,currently,alerts,flags&extend=daily&lang=sv&units=auto';
162
+            $urls[] = 'https://api.darksky.net/forecast/' . $this->apikey2 . '/' . $location . ',' . $time . '?exclude=minutely,hourly,currently,alerts,flags&extend=daily&lang=sv&units=auto';
163 163
         }
164 164
         return $urls;
165 165
     }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
     public function getDayFormat($day)
171 171
     {
172 172
         $date = new Datetime();
173
-        $date->sub(new DateInterval('P'. (intval($day) + 1) .'D'));
173
+        $date->sub(new DateInterval('P' . (intval($day) + 1) . 'D'));
174 174
         return $date->format('U');
175 175
     }
176 176
 
Please login to merge, or discard this patch.