Completed
Push — master ( 14da43...08fd2e )
by Russell
30s queued 27s
created
src/Handler/SentryHandler.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 use Monolog\Handler\AbstractProcessingHandler;
13 13
 use Monolog\Logger;
14 14
 use Sentry\Severity;
15
-use Sentry\State\Scope;
16 15
 use SilverStripe\Core\Injector\Injectable;
17 16
 use PhpTek\Sentry\Log\SentryLogger;
18 17
 use PhpTek\Sentry\Adaptor\SentryAdaptor;
Please login to merge, or discard this patch.
src/Log/SentryLogger.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -225,47 +225,47 @@
 block discarded – undo
225 225
         return php_sapi_name();
226 226
     }
227 227
 
228
- 	/**
229
-	 * Returns the client IP address which originated this request.
230
-     * Lifted and modified from SilverStripe 3's SS_HTTPRequest.
231
-	 *
232
-	 * @return string
233
-	 */
234
-	public function getIP() : string
228
+        /**
229
+         * Returns the client IP address which originated this request.
230
+         * Lifted and modified from SilverStripe 3's SS_HTTPRequest.
231
+         *
232
+         * @return string
233
+         */
234
+    public function getIP() : string
235 235
     {
236
-		$headerOverrideIP = null;
236
+        $headerOverrideIP = null;
237 237
 
238
-		if (defined('TRUSTED_PROXY')) {
239
-			$headers = (defined('SS_TRUSTED_PROXY_IP_HEADER')) ?
238
+        if (defined('TRUSTED_PROXY')) {
239
+            $headers = (defined('SS_TRUSTED_PROXY_IP_HEADER')) ?
240 240
                 [SS_TRUSTED_PROXY_IP_HEADER] :
241 241
                 null;
242 242
 
243
-			if(!$headers) {
244
-				// Backwards compatible defaults
245
-				$headers = ['HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR'];
246
-			}
243
+            if(!$headers) {
244
+                // Backwards compatible defaults
245
+                $headers = ['HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR'];
246
+            }
247 247
 
248
-			foreach($headers as $header) {
249
-				if(!empty($_SERVER[$header])) {
250
-					$headerOverrideIP = $_SERVER[$header];
248
+            foreach($headers as $header) {
249
+                if(!empty($_SERVER[$header])) {
250
+                    $headerOverrideIP = $_SERVER[$header];
251 251
 
252
-					break;
253
-				}
254
-			}
255
-		}
252
+                    break;
253
+                }
254
+            }
255
+        }
256 256
 
257 257
         $proxy = Injector::inst()->create(TrustedProxyMiddleware::class);
258 258
 
259
-		if ($headerOverrideIP) {
260
-			return $proxy->getIPFromHeaderValue($headerOverrideIP);
261
-		}
259
+        if ($headerOverrideIP) {
260
+            return $proxy->getIPFromHeaderValue($headerOverrideIP);
261
+        }
262 262
 
263 263
         if (isset($_SERVER['REMOTE_ADDR'])) {
264
-			return $_SERVER['REMOTE_ADDR'];
265
-		}
264
+            return $_SERVER['REMOTE_ADDR'];
265
+        }
266 266
 
267 267
         return '';
268
-	}
268
+    }
269 269
 
270 270
     /**
271 271
      * Returns a default set of additional data specific to the user's part in
Please login to merge, or discard this patch.