Passed
Push — master ( ed6cdc...40a6e6 )
by Nicolaas
03:09
created
src/Api/CloudFlareGeoIP.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -66,17 +66,17 @@  discard block
 block discarded – undo
66 66
                 Controller::curr()->getRequest()->getSession()->set('MyCloudFlareCountry', $code);
67 67
             }
68 68
         }
69
-        if (! $code) {
69
+        if (!$code) {
70 70
             if (isset($_SERVER['HTTP_CF_IPCOUNTRY']) && $_SERVER['HTTP_CF_IPCOUNTRY']) {
71 71
                 return $_SERVER['HTTP_CF_IPCOUNTRY'];
72 72
             }
73 73
             $code = Controller::curr()->getRequest()->getSession()->get('MyCloudFlareCountry');
74
-            if (! $code) {
74
+            if (!$code) {
75 75
                 $address = self::get_remote_address();
76 76
                 if (strlen($address) > 3) {
77 77
                     $code = CloudFlareGeoIP::ip2country($address, true);
78 78
                 }
79
-                if (! $code) {
79
+                if (!$code) {
80 80
                     $code = self::get_default_country_code();
81 81
                 }
82 82
                 if ($code === '') {
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
         } elseif (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
102 102
             $ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
103 103
         }
104
-        if (! $ip ||
105
-            ! filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)
104
+        if (!$ip ||
105
+            !filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)
106 106
         ) {
107 107
             $ip = Controller::curr()->getRequest()->getIP();
108 108
         }
Please login to merge, or discard this patch.