Completed
Push — master ( bfdada...45e4b7 )
by Martin
02:27
created
view/weatherapi/weather-data.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             <?php endforeach; ?>
85 85
         </table>
86 86
     </p>
87
-    <?php endif ; ?>
87
+    <?php endif; ?>
88 88
 <div id="map" style="width: 800px; height: 450px;"></div>
89 89
 <script src="<?= url("js/leaflet.js") ?>"></script>
90 90
 <script type="text/javascript">
@@ -111,4 +111,4 @@  discard block
 block discarded – undo
111 111
     }
112 112
   }, 500);
113 113
 </script>
114
-<?php endif ; ?>
114
+<?php endif; ?>
Please login to merge, or discard this patch.
config/di/weather.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
     "services" => [
8 8
         "weather" => [
9 9
             "shared" => true,
10
-            "callback" => function () {
10
+            "callback" => function() {
11 11
                 $weather = new \Anax\WeatherAPI\WeatherModel;
12 12
                 return $weather;
13 13
             }
Please login to merge, or discard this patch.
src/WeatherAPI/WeatherController.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $page->add("weatherapi/weather", $data);
47 47
 
48 48
         return $page->render([
49
-         "title" => $title,
49
+            "title" => $title,
50 50
         ]);
51 51
     }
52 52
     public function weatherDataAction() : object
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $page->add("weatherapi/weather-data", $data);
70 70
 
71 71
         return $page->render([
72
-         "title" => $title,
72
+            "title" => $title,
73 73
         ]);
74 74
     }
75 75
     /**
Please login to merge, or discard this patch.
src/WeatherAPI/WeatherJSONController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         $page->add("weatherapi/weather-json", $data);
46 46
 
47 47
         return $page->render([
48
-         "title" => $title,
48
+            "title" => $title,
49 49
         ]);
50 50
     }
51 51
     /**
Please login to merge, or discard this patch.
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.