Completed
Push — master ( 51c1f5...1727e6 )
by simon
04:12 queued 01:46
created
src/Model/Weather.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
                 $now -= 86400;
83 83
                 $dates[] = $now;
84 84
             }
85
-        } elseif($when == "future") {
85
+        } elseif ($when == "future") {
86 86
             for ($i = 0; $i < 7; $i++) {
87 87
             $now += 86400;
88 88
             $dates[] = $now;
Please login to merge, or discard this patch.
src/Controller/weatherController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
             $validator = new \Anax\Model\ipValidation;
63 63
             $res = $validator->toJson($ip);
64 64
 
65
-            if ($res["valid"] == "valid IP"){
65
+            if ($res["valid"] == "valid IP") {
66 66
                 $locationInfo = $weather->getLocationData($res["city"]);
67 67
             } else {
68
-                if (!isset($search)){
68
+                if (!isset($search)) {
69 69
                 $locationInfo = $weather->getLocationData("");
70
-            } else{
70
+            } else {
71 71
                 $locationInfo = $weather->getLocationData($search);
72 72
             }
73 73
         }
@@ -78,8 +78,8 @@  discard block
 block discarded – undo
78 78
             $error = $locationInfo["error"] ?? null;
79 79
             $this->di->session->set("error", $error);
80 80
 
81
-            if ($locationInfo["error"] == null){
82
-                $weatherInfo = $weather->getWeather($when,$lon,$lat);
81
+            if ($locationInfo["error"] == null) {
82
+                $weatherInfo = $weather->getWeather($when, $lon, $lat);
83 83
                 $time = $weatherInfo["time"] ?? null;
84 84
                 $this->di->session->set("time", $time);
85 85
 
Please login to merge, or discard this patch.
src/Controller/weatherApiController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,20 +27,20 @@
 block discarded – undo
27 27
         $validator = new \Anax\Model\ipValidation;
28 28
         $res = $validator->toJson($ip);
29 29
 
30
-        if ($res["valid"] == "valid IP"){
30
+        if ($res["valid"] == "valid IP") {
31 31
             $locationInfo = $weather->getLocationData($res["city"]);
32 32
         } else {
33
-            if (!isset($search)){
33
+            if (!isset($search)) {
34 34
                 $locationInfo = $weather->getLocationData("");
35
-            } else{
35
+            } else {
36 36
                 $locationInfo = $weather->getLocationData($search);
37 37
             }
38 38
         }
39 39
         $lon = $locationInfo["lon"] ?? null;
40 40
         $lat = $locationInfo["lat"] ?? null;
41
-        if (!isset($locationInfo["error"])){
41
+        if (!isset($locationInfo["error"])) {
42 42
 
43
-            $weatherInfo = $weather->getWeatherMultiCurl($when,$lon,$lat);
43
+            $weatherInfo = $weather->getWeatherMultiCurl($when, $lon, $lat);
44 44
         } else {
45 45
             $weatherInfo = ["error" => "that is not a city"];
46 46
         }
Please login to merge, or discard this patch.