| @@ -55,9 +55,12 @@ | ||
| 55 | 55 | Temperature during day <?= $pastDay["current"]["temp"] ?> degrees Celsius and the wind speed <?= $pastDay["current"]["wind_speed"] ?> m/s.</p> | 
| 56 | 56 | <?php endforeach; ?> | 
| 57 | 57 | |
| 58 | -<?php else : ?> | |
| 58 | +<?php else { | |
| 59 | + : ?> | |
| 59 | 60 | <p>Not a valid IP-address</p> | 
| 60 | 61 | <p><a href="../weather">Try again</a></p> | 
| 61 | -<?php endif; ?> | |
| 62 | +<?php endif; | |
| 63 | +} | |
| 64 | +?> | |
| 62 | 65 | |
| 63 | 66 | </article> | 
| @@ -22,21 +22,30 @@ | ||
| 22 | 22 | <?php if ($ip) : ?> | 
| 23 | 23 | <?php if ($resultIPv4) : ?> | 
| 24 | 24 | <p><?= $ip ?> is a valid IPv4 address</p> | 
| 25 | - <?php else : ?> | |
| 25 | +    <?php else { | |
| 26 | + : ?> | |
| 26 | 27 | <p><?= $ip ?> is not a valid IPv4 address</p> | 
| 27 | - <?php endif; ?> | |
| 28 | + <?php endif; | |
| 29 | +} | |
| 30 | +?> | |
| 28 | 31 | |
| 29 | 32 | <?php if ($resultIPv6) : ?> | 
| 30 | 33 | <p><?= $ip ?> is a valid IPv6 address</p> | 
| 31 | - <?php else : ?> | |
| 34 | +    <?php else { | |
| 35 | + : ?> | |
| 32 | 36 | <p><?= $ip ?> is not a valid IPv6 address</p> | 
| 33 | - <?php endif; ?> | |
| 37 | + <?php endif; | |
| 38 | +} | |
| 39 | +?> | |
| 34 | 40 | |
| 35 | 41 | <?php if ($domain) : ?> | 
| 36 | 42 | <p><?= $ip ?> has domainname <?= $domain ?></p> | 
| 37 | - <?php else : ?> | |
| 43 | +    <?php else { | |
| 44 | + : ?> | |
| 38 | 45 | <p>No domainname found for <?= $ip ?></p> | 
| 39 | - <?php endif; ?> | |
| 46 | + <?php endif; | |
| 47 | +} | |
| 48 | +?> | |
| 40 | 49 | |
| 41 | 50 | <?php if ($location != "Not valid IP-address.") : ?> | 
| 42 | 51 | <p><b>Location</b></p> | 
| @@ -18,7 +18,7 @@ | ||
| 18 | 18 | // Callback executed when service is activated | 
| 19 | 19 | // Create the service, load its configuration (if any) | 
| 20 | 20 | // and set it up. | 
| 21 | -            "callback" => function () { | |
| 21 | +            "callback" => function() { | |
| 22 | 22 | $service = new \Lii\Service\UserInfoService(); | 
| 23 | 23 | $service->setDi($this); | 
| 24 | 24 | |
| @@ -18,7 +18,7 @@ | ||
| 18 | 18 | // Callback executed when service is activated | 
| 19 | 19 | // Create the service, load its configuration (if any) | 
| 20 | 20 | // and set it up. | 
| 21 | -            "callback" => function () { | |
| 21 | +            "callback" => function() { | |
| 22 | 22 | $service = new \Lii\Service\ApiKeyService(); | 
| 23 | 23 | |
| 24 | 24 | // Load the configuration file(s) | 
| @@ -58,7 +58,7 @@ | ||
| 58 | 58 |      { | 
| 59 | 59 | // Deal with the action and return a response. | 
| 60 | 60 | $json = [ | 
| 61 | -            "message" => __METHOD__ . ", \$db is {$this->db}", | |
| 61 | +            "message" => __METHOD__.", \$db is {$this->db}", | |
| 62 | 62 | ]; | 
| 63 | 63 | return [$json]; | 
| 64 | 64 | } | 
| @@ -157,8 +157,4 @@ | ||
| 157 | 157 | ]; | 
| 158 | 158 |          $page->add("Lii/default", $data); | 
| 159 | 159 | |
| 160 | - return $page->render([ | |
| 161 | - "title" => __METHOD__, | |
| 162 | - ]); | |
| 163 | - } | |
| 164 | -} | |
| 160 | + return $page->render | |
| 165 | 161 | \ No newline at end of file | 
| @@ -157,8 +157,4 @@ | ||
| 157 | 157 | ]; | 
| 158 | 158 |          $page->add("Lii/default", $data); | 
| 159 | 159 | |
| 160 | - return $page->render([ | |
| 161 | - "title" => __METHOD__, | |
| 162 | - ]); | |
| 163 | - } | |
| 164 | -} | |
| 160 | + return $page->render | |
| 165 | 161 | \ No newline at end of file | 
| @@ -157,8 +157,4 @@ | ||
| 157 | 157 | ]; | 
| 158 | 158 |          $page->add("Lii/default", $data); | 
| 159 | 159 | |
| 160 | - return $page->render([ | |
| 161 | - "title" => __METHOD__, | |
| 162 | - ]); | |
| 163 | - } | |
| 164 | -} | |
| 160 | + return $page->render | |
| 165 | 161 | \ No newline at end of file | 
| @@ -157,8 +157,4 @@ | ||
| 157 | 157 | ]; | 
| 158 | 158 |          $page->add("Lii/default", $data); | 
| 159 | 159 | |
| 160 | - return $page->render([ | |
| 161 | - "title" => __METHOD__, | |
| 162 | - ]); | |
| 163 | - } | |
| 164 | -} | |
| 160 | + return $page->render | |
| 165 | 161 | \ No newline at end of file | 
| @@ -157,8 +157,4 @@ | ||
| 157 | 157 | ]; | 
| 158 | 158 |          $page->add("Lii/default", $data); | 
| 159 | 159 | |
| 160 | - return $page->render([ | |
| 161 | - "title" => __METHOD__, | |
| 162 | - ]); | |
| 163 | - } | |
| 164 | -} | |
| 160 | + return $page->render | |
| 165 | 161 | \ No newline at end of file |