@@ -105,7 +105,7 @@ discard block  | 
                                                    ||
| 105 | 105 |      public function getIpAddress() { | 
                                                        
| 106 | 106 | $ip_address = $this->getIpAddressFromProxy();  | 
                                                        
| 107 | 107 | |
| 108 | -        if($ip_address == "127.0.0.1" || strlen($ip_address) < 7) { | 
                                                        |
| 108 | +        if ($ip_address == "127.0.0.1" || strlen($ip_address) < 7) { | 
                                                        |
| 109 | 109 | $ip_address = false;  | 
                                                        
| 110 | 110 | }  | 
                                                        
| 111 | 111 | |
@@ -115,7 +115,7 @@ discard block  | 
                                                    ||
| 115 | 115 | |
| 116 | 116 |          $ip_address = $this->getServerVariable("REMOTE_ADDR"); | 
                                                        
| 117 | 117 | |
| 118 | -        if(strlen($ip_address) < 7) { | 
                                                        |
| 118 | +        if (strlen($ip_address) < 7) { | 
                                                        |
| 119 | 119 | $ip_address = "127.0.0.1";  | 
                                                        
| 120 | 120 | }  | 
                                                        
| 121 | 121 | |
@@ -175,12 +175,12 @@ discard block  | 
                                                    ||
| 175 | 175 | $header = strtoupper($header);  | 
                                                        
| 176 | 176 |          $header = str_replace('-', '_', $header); | 
                                                        
| 177 | 177 |          if (0 !== strpos($header, 'HTTP_')) { | 
                                                        
| 178 | - $header = 'HTTP_' . $header;  | 
                                                        |
| 178 | + $header = 'HTTP_'.$header;  | 
                                                        |
| 179 | 179 | }  | 
                                                        
| 180 | 180 | return $header;  | 
                                                        
| 181 | 181 | }  | 
                                                        
| 182 | 182 | |
| 183 | -    protected function getServerVariable($key, $default = null){ | 
                                                        |
| 183 | +    protected function getServerVariable($key, $default = null) { | 
                                                        |
| 184 | 184 |          if (!isset($_SERVER[$key]) || empty($_SERVER[$key])) { | 
                                                        
| 185 | 185 | return $default;  | 
                                                        
| 186 | 186 | }  | 
                                                        
@@ -191,7 +191,7 @@ discard block  | 
                                                    ||
| 191 | 191 | /**  | 
                                                        
| 192 | 192 | * @return bool  | 
                                                        
| 193 | 193 | */  | 
                                                        
| 194 | -    public function isProxy(){ | 
                                                        |
| 194 | +    public function isProxy() { | 
                                                        |
| 195 | 195 | $test_HTTP_proxy_headers = [  | 
                                                        
| 196 | 196 | 'HTTP_VIA',  | 
                                                        
| 197 | 197 | 'VIA',  | 
                                                        
@@ -217,7 +217,7 @@ discard block  | 
                                                    ||
| 217 | 217 | 'HTTP_PROXY_CONNECTION'  | 
                                                        
| 218 | 218 | ];  | 
                                                        
| 219 | 219 | |
| 220 | -        foreach($test_HTTP_proxy_headers as $header){ | 
                                                        |
| 220 | +        foreach ($test_HTTP_proxy_headers as $header) { | 
                                                        |
| 221 | 221 |              if ($this->getServerVariable($header, false)) { | 
                                                        
| 222 | 222 | return true;  | 
                                                        
| 223 | 223 | }  |