Completed
Push — master ( 8aa80b...2a94fd )
by Klas
02:39
created
src/KWcontroller/IpGeotagController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function resultActionGet()
42 42
     {
43 43
         $ipn = $this->di->get("request")->getGet("ipnummer");
44
-        $res =[];
44
+        $res = [];
45 45
 
46 46
         $paraply = new \KW\Models\IpUmbrella($this->di);
47 47
         $res = $paraply->input($ipn);
@@ -59,15 +59,15 @@  discard block
 block discarded – undo
59 59
     public function indexActionPost() : array
60 60
     {
61 61
         $ipn = $this->di->get("request")->getPost("ipnummer");
62
-        $res =[];
62
+        $res = [];
63 63
         $paraply = new \KW\Models\IpUmbrella($this->di);
64 64
         $res = $paraply->input($ipn);
65 65
 
66 66
         if ($res["latitude"]) {
67 67
             $res["url-link"] = "https://www.openstreetmap.org/?mlat="
68
-            . $res["latitude"]. "&mlon="
69
-            . $res["longitude"] ."&zoom=12#map=12/"
70
-            . $res["latitude"] ."/"
68
+            . $res["latitude"] . "&mlon="
69
+            . $res["longitude"] . "&zoom=12#map=12/"
70
+            . $res["latitude"] . "/"
71 71
             . $res["longitude"];
72 72
         } else {
73 73
             $res["url-link"] = null;
Please login to merge, or discard this patch.
src/KWcontroller/IpWebController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
                     "message" => "Not a valid ip-number"
47 47
                 ];
48 48
         } else {
49
-            $type = (filter_var($ipn, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) ? "ipv4" : "ipv6" );
49
+            $type = (filter_var($ipn, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) ? "ipv4" : "ipv6");
50 50
             $domainname = gethostbyaddr($ipn);
51 51
 
52 52
             $domainname = ($domainname == $ipn ? "none" : $domainname);
Please login to merge, or discard this patch.
src/Models/JsonWeather.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@
 block discarded – undo
19 19
     {
20 20
         $days = [];
21 21
         $mapUrl = "https://www.openstreetmap.org/?mlat="
22
-        . $res["latitude"]. "&mlon="
23
-        . $res["longitude"] ."&zoom=12#map=12/"
24
-        . $res["latitude"] ."/"
22
+        . $res["latitude"] . "&mlon="
23
+        . $res["longitude"] . "&zoom=12#map=12/"
24
+        . $res["latitude"] . "/"
25 25
         . $res["longitude"];
26 26
 
27 27
         $type = ($res["type"] == "past" ? "past mounth" : "future week");
Please login to merge, or discard this patch.
src/Models/DarkSky.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 
22 22
     public function weather($longitude, $latitude, $type)
23 23
     {
24
-        if ($type=="future") {
24
+        if ($type == "future") {
25 25
             $url = ($this->baseUrl . $this->darkSkyKey . "/" . $latitude . "," . $longitude . $this->apiSettings);
26 26
             $cURL = new CURL;
27 27
             $result = $cURL->req($url);
Please login to merge, or discard this patch.
src/Models/DarkSkyUmbrella.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
                 $this->wobj["error"] = "Du måste ange korrekt longitud och latitud om ipnummer ej anges!";
63 63
                 return $this->wobj;
64 64
             }
65
-            $this->wobj["latitude"]= $latitude;
65
+            $this->wobj["latitude"] = $latitude;
66 66
             $this->wobj["longitude"] = $longitude;
67 67
             list($this->wobj["country"], $this->wobj["city"]) = $this->osmr->osmCheckCoordinates($longitude, $latitude);
68 68
         }
Please login to merge, or discard this patch.
src/Models/MultiCURL.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@  discard block
 block discarded – undo
29 29
         $datum = time();
30 30
 
31 31
         // create all cURL resources
32
-        for ($i=0; $i < 30; $i++) {
32
+        for ($i = 0; $i < 30; $i++) {
33 33
             $chh[$i] = curl_init();
34 34
         }
35 35
 
36 36
         // set URL and other appropriate options
37
-        for ($i=0; $i < 30; $i++) {
37
+        for ($i = 0; $i < 30; $i++) {
38 38
             $aktuellsekund = $datum - 30*86400 + $i*86400;
39 39
             $url = ($this->baseUrl . $this->darkSkyKey . "/" . $latitude . "," . $longitude . "," . $aktuellsekund . $this->apiSettings);
40 40
             // create all cURL resources
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $mhh = curl_multi_init();
48 48
 
49 49
         //add the handles
50
-        for ($i=0; $i < 30; $i++) {
50
+        for ($i = 0; $i < 30; $i++) {
51 51
             curl_multi_add_handle($mhh, $chh[$i]);
52 52
         }
53 53
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
         curl_multi_close($mhh);
68 68
 
69
-        for ($i=0; $i < 30; $i++) {
69
+        for ($i = 0; $i < 30; $i++) {
70 70
             if (isset($svar[$i]->daily->data[0])) {
71 71
                 $result['daily']['data'][$i] = $svar[$i]->daily->data[0];
72 72
             } else {
Please login to merge, or discard this patch.
src/Models/IpType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
      */
12 12
     public function ipType(string $ipnumber)
13 13
     {
14
-        $type = (filter_var($ipnumber, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) ? "ipv4" : "ipv6" );
14
+        $type = (filter_var($ipnumber, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) ? "ipv4" : "ipv6");
15 15
         // $domainname = gethostbyaddr($ipnumber);
16 16
         // $domainname = ($domainname == $ipnumber ? "none" : $domainname);
17 17
         return $type;
Please login to merge, or discard this patch.
config/di/jsonweather.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
         "jsonWeather" => [
10 10
             "shared" => true,
11 11
             "active" => true,
12
-            "callback" => function () {
12
+            "callback" => function() {
13 13
                 $obj = new \KW\Models\JsonWeather();
14 14
                 return $obj;
15 15
             }
Please login to merge, or discard this patch.
config/di/request.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
         "request" => [
9 9
             "shared" => true,
10
-            "callback" => function () {
10
+            "callback" => function() {
11 11
                 $obj = new \Anax\Request\Request();
12 12
                 $obj->init();
13 13
                 return $obj;
Please login to merge, or discard this patch.