Passed
Push — master ( 9c21af...8e9b7d )
by Nicolaas
08:33
created
src/Api/CloudFlareGeoIP.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -61,19 +61,19 @@  discard block
 block discarded – undo
61 61
                 Controller::curr()->getRequest()->getSession()->set('MyCloudFlareCountry', $code);
62 62
             }
63 63
         }
64
-        if (! $code) {
64
+        if (!$code) {
65 65
             if (isset($_SERVER['HTTP_CF_IPCOUNTRY']) && $_SERVER['HTTP_CF_IPCOUNTRY']) {
66 66
                 return $_SERVER['HTTP_CF_IPCOUNTRY'];
67 67
             }
68 68
             $code = Controller::curr()->getRequest()->getSession()->get('MyCloudFlareCountry');
69
-            if (! $code) {
69
+            if (!$code) {
70 70
                 if ($address = self::get_remote_address()) {
71 71
                     $code = CloudFlareGeoip::ip2country($address, true);
72 72
                 }
73
-                if (! $code) {
73
+                if (!$code) {
74 74
                     $code = self::get_default_country_code();
75 75
                 }
76
-                if (! $code) {
76
+                if (!$code) {
77 77
                     $code = Config::inst()->get('CloudFlareGeoip', 'default_country_code');
78 78
                 }
79 79
                 Controller::curr()->getRequest()->getSession()->set('MyCloudFlareCountry', $code);
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
         } elseif (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
96 96
             $ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
97 97
         }
98
-        if (! $ip ||
99
-            ! filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)
98
+        if (!$ip ||
99
+            !filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)
100 100
         ) {
101 101
             $ip = Controller::curr()->getRequest()->getIP();
102 102
         }
Please login to merge, or discard this patch.