Completed
Push — master ( a3c64e...df0f49 )
by Christofer
02:30
created
src/Controller/WeatherController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
         $api = $this->di->get("ipstack");
19 19
         $ipstack = $api["config"];
20 20
         $getipInfo = new Models\Curl;
21
-        $extra =  "&fields=ip";
22
-        $userIp =  $getipInfo->cUrl($ipstack["url"]. "check". '?access_key='. $ipstack["key"]. $extra);
21
+        $extra = "&fields=ip";
22
+        $userIp = $getipInfo->cUrl($ipstack["url"]."check".'?access_key='.$ipstack["key"].$extra);
23 23
         $apiResult = json_decode($userIp, true);
24 24
 
25 25
         $session->set("userIp", $apiResult["ip"]);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
         $extra = "?lang=sv&units=auto";
76 76
         $mapDiv = $map->getMap($latitude, $longitude);
77
-        $weatherJson = $getJson->cUrl($darksky["url"]. $darksky["key"]. "/". $latitude. ",". $longitude. $extra);
77
+        $weatherJson = $getJson->cUrl($darksky["url"].$darksky["key"]."/".$latitude.",".$longitude.$extra);
78 78
 
79 79
         $weather = json_decode($weatherJson, true);
80 80
         $page->add("weather/weather", [
@@ -131,16 +131,16 @@  discard block
 block discarded – undo
131 131
         $url = [];
132 132
         $extra = "?lang=sv&units=auto";
133 133
         $time  = time() - (30 * 24 * 60 * 60);
134
-        for ($i=0; $i < 31; $i++) {
135
-            $time  = time() - ($i * 24 * 60 * 60);
136
-            array_push($url, $darksky["url"]. $darksky["key"]. "/". $latitude. ",". $longitude. ",". $time. $extra);
134
+        for ($i = 0; $i < 31; $i++) {
135
+            $time = time() - ($i * 24 * 60 * 60);
136
+            array_push($url, $darksky["url"].$darksky["key"]."/".$latitude.",".$longitude.",".$time.$extra);
137 137
         }
138 138
 
139 139
 
140 140
         $mapDiv = $map->getMap($latitude, $longitude);
141 141
         $weatherJson = $getJson->cUrlMulti($url);
142 142
         $weather = [];
143
-        for ($i=0; $i < count($weatherJson); $i++) {
143
+        for ($i = 0; $i < count($weatherJson); $i++) {
144 144
             array_push($weather, json_decode($weatherJson[$i], true));
145 145
         }
146 146
 
Please login to merge, or discard this patch.