@@ -7,7 +7,7 @@ |
||
7 | 7 | "services" => [ |
8 | 8 | "callurl" => [ |
9 | 9 | "shared" => true, |
10 | - "callback" => function () { |
|
10 | + "callback" => function() { |
|
11 | 11 | $callUrl = new \Erjh17\CallUrl\CallUrl(); |
12 | 12 | $callUrl->setDI($this); |
13 | 13 | return $callUrl; |
@@ -9,7 +9,7 @@ |
||
9 | 9 | "response" => [ |
10 | 10 | "shared" => true, |
11 | 11 | //"callback" => "\Anax\Response\Response", |
12 | - "callback" => function () { |
|
12 | + "callback" => function() { |
|
13 | 13 | $obj = new \Anax\Response\ResponseUtility(); |
14 | 14 | $obj->setDI($this); |
15 | 15 | return $obj; |
@@ -8,7 +8,7 @@ |
||
8 | 8 | "services" => [ |
9 | 9 | "configuration" => [ |
10 | 10 | "shared" => true, |
11 | - "callback" => function () { |
|
11 | + "callback" => function() { |
|
12 | 12 | $config = new \Anax\Configure\Configuration(); |
13 | 13 | $dirs = require ANAX_INSTALL_PATH . "/config/configuration.php"; |
14 | 14 | $config->setBaseDirectories($dirs); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | "siteLogo" => "image/theme/leaf_256x256.png", |
41 | 41 | "siteLogoAlt" => "Löv", |
42 | 42 | ], |
43 | - ],/* |
|
43 | + ], /* |
|
44 | 44 | [ |
45 | 45 | "region" => "header-col-1", |
46 | 46 | "template" => "anax/v2/header/site_logo_text", |
@@ -14,7 +14,7 @@ |
||
14 | 14 | $content = $content ?? null; |
15 | 15 | |
16 | 16 | $url = $di->get("url"); |
17 | -$request = $di->get("request"); |
|
17 | +$request = $di->get("request"); |
|
18 | 18 | |
19 | 19 | |
20 | 20 | ?><div class="$class"> |
@@ -46,9 +46,11 @@ |
||
46 | 46 | <?= $errorMsg ?> |
47 | 47 | </pre> |
48 | 48 | <?php |
49 | - else : |
|
49 | + else { |
|
50 | + : |
|
50 | 51 | if (isset($currently)) : |
51 | 52 | include "currentWeather.php"; |
53 | + } |
|
52 | 54 | endif; |
53 | 55 | if (isset($hours)) : |
54 | 56 | include "hourlyWeather.php"; |
@@ -154,8 +154,8 @@ discard block |
||
154 | 154 | $longitude = str_replace(",", ".", $this->longitude); |
155 | 155 | $zLevel = $zoomLevel["zoomLevel"]; |
156 | 156 | $radius = $zoomLevel["radius"]; |
157 | - $script = " window.addEventListener('load', function() {". |
|
158 | - " window.initMap($longitude, $latitude, $zLevel, $radius);". |
|
157 | + $script = " window.addEventListener('load', function() {" . |
|
158 | + " window.initMap($longitude, $latitude, $zLevel, $radius);" . |
|
159 | 159 | " var skycons = new Skycons({'color': 'white'});"; |
160 | 160 | $icon = $this->currently['icon']; |
161 | 161 | $script .= " skycons.add('icon1', '$icon');"; |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $icon = $day['icon']; |
165 | 165 | $script .= "skycons.add('icon$time', '$icon');"; |
166 | 166 | } |
167 | - $script .= " skycons.play();". |
|
167 | + $script .= " skycons.play();" . |
|
168 | 168 | " });"; |
169 | 169 | return $script; |
170 | 170 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $hourly = []; |
180 | 180 | if ($this->hourly && isset($this->hourly["data"])) { |
181 | 181 | $this->hourly["data"] = array_slice($this->hourly["data"], 0, 12); |
182 | - for ($i=0; $i < sizeof($this->hourly["data"]); $i++) { |
|
182 | + for ($i = 0; $i < sizeof($this->hourly["data"]); $i++) { |
|
183 | 183 | setlocale(LC_ALL, 'sv_SV'); |
184 | 184 | $time = $this->hourly["data"][$i]["time"]; |
185 | 185 | if ($time) { |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | |
219 | 219 | if ($this->pastDays["data"]) { |
220 | 220 | setlocale(LC_ALL, 'sv_SV'); |
221 | - for ($i=0; $i < sizeof($this->pastDays["data"]); $i++) { |
|
221 | + for ($i = 0; $i < sizeof($this->pastDays["data"]); $i++) { |
|
222 | 222 | $time = $this->pastDays["data"][$i]["time"]; |
223 | 223 | if ($time) { |
224 | 224 | $this->parseDate("pastDays", $i, $time); |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | if ($this->daily) { |
276 | 276 | $this->daily["data"] = array_slice($this->daily["data"], 1, 30); |
277 | 277 | setlocale(LC_ALL, 'sv_SV'); |
278 | - for ($i=0; $i < sizeof($this->daily["data"]); $i++) { |
|
278 | + for ($i = 0; $i < sizeof($this->daily["data"]); $i++) { |
|
279 | 279 | $time = $this->daily["data"][$i]["time"]; |
280 | 280 | if ($time) { |
281 | 281 | $this->parseDate("daily", $i, $time); |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | public function calculateTimeMachine() |
308 | 308 | { |
309 | 309 | $days = array(); |
310 | - for ($i=1; $i < 31; $i++) { |
|
310 | + for ($i = 1; $i < 31; $i++) { |
|
311 | 311 | $date = date('c', strtotime("-$i days")); |
312 | 312 | array_push($days, strtotime($date)); |
313 | 313 | } |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | } |
380 | 380 | |
381 | 381 | $pastDays = array("data" => []); |
382 | - for ($i=1; $i < sizeof($apiResult); $i++) { |
|
382 | + for ($i = 1; $i < sizeof($apiResult); $i++) { |
|
383 | 383 | if ($apiResult[$i] && isset($apiResult[$i]["daily"]["data"][0])) { |
384 | 384 | array_push($pastDays["data"], $apiResult[$i]["daily"]["data"][0]); |
385 | 385 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | $content = $content ?? null; |
15 | 15 | |
16 | 16 | $url = $di->get("url"); |
17 | -$request = $di->get("request"); |
|
17 | +$request = $di->get("request"); |
|
18 | 18 | |
19 | 19 | |
20 | 20 | ?><div class="$class"> |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | public function fetch($urlHost, $query) |
26 | 26 | { |
27 | 27 | $queryString = "?" . http_build_query($query); |
28 | - $apiGet = curl_init($urlHost.$queryString); |
|
28 | + $apiGet = curl_init($urlHost . $queryString); |
|
29 | 29 | |
30 | 30 | curl_setopt($apiGet, CURLOPT_RETURNTRANSFER, true); |
31 | 31 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $nodes = array(); |
90 | 90 | $results = array(); |
91 | 91 | |
92 | - for ($i=0; $i < sizeof($urls); $i++) { |
|
92 | + for ($i = 0; $i < sizeof($urls); $i++) { |
|
93 | 93 | $url = $this->buildUrl($urls[$i], $params[$i], $queries[$i]); |
94 | 94 | array_push($nodes, $url); |
95 | 95 | } |