Completed
Pull Request — master (#8)
by Thomas
07:46
created
src/Adaptor/RavenClient.php 1 patch
Switch Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -82,21 +82,21 @@
 block discarded – undo
82 82
     public function setData($field, $data)
83 83
     {
84 84
         switch($field) {
85
-        case 'env':
86
-            $this->client->setEnvironment($data);
87
-            break;
88
-        case 'tags':
89
-            $this->client->tags_context($data);
90
-            break;
91
-        case 'user':
92
-            $this->client->user_context($data);
93
-            break;
94
-        case 'extra':
95
-            $this->client->extra_context($data);
96
-            break;
97
-        default:
98
-            $msg = sprintf('Unknown field "%s" passed to %s().', $field, __FUNCTION__);
99
-            throw new SentryLogWriterException($msg);
85
+            case 'env':
86
+                $this->client->setEnvironment($data);
87
+                break;
88
+            case 'tags':
89
+                $this->client->tags_context($data);
90
+                break;
91
+            case 'user':
92
+                $this->client->user_context($data);
93
+                break;
94
+            case 'extra':
95
+                $this->client->extra_context($data);
96
+                break;
97
+            default:
98
+                $msg = sprintf('Unknown field "%s" passed to %s().', $field, __FUNCTION__);
99
+                throw new SentryLogWriterException($msg);
100 100
         }
101 101
     }
102 102
     
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
@@ -218,46 +218,46 @@
 block discarded – undo
218 218
         return php_sapi_name();
219 219
     }
220 220
 
221
- 	/**
222
-	 * Returns the client IP address which originated this request.
223
-     * Lifted and modified from SilverStripe 3's SS_HTTPRequest.
224
-	 *
225
-	 * @return string
226
-	 */
227
-	public function getIP()
221
+        /**
222
+         * Returns the client IP address which originated this request.
223
+         * Lifted and modified from SilverStripe 3's SS_HTTPRequest.
224
+         *
225
+         * @return string
226
+         */
227
+    public function getIP()
228 228
     {
229
-		$headerOverrideIP = null;
229
+        $headerOverrideIP = null;
230 230
 
231
-		if (defined('TRUSTED_PROXY')) {
232
-			$headers = (defined('SS_TRUSTED_PROXY_IP_HEADER')) ?
231
+        if (defined('TRUSTED_PROXY')) {
232
+            $headers = (defined('SS_TRUSTED_PROXY_IP_HEADER')) ?
233 233
                 array(SS_TRUSTED_PROXY_IP_HEADER) :
234 234
                 null;
235 235
 
236
-			if(!$headers) {
237
-				// Backwards compatible defaults
238
-				$headers = ['HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR'];
239
-			}
236
+            if(!$headers) {
237
+                // Backwards compatible defaults
238
+                $headers = ['HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR'];
239
+            }
240 240
 
241
-			foreach($headers as $header) {
242
-				if(!empty($_SERVER[$header])) {
243
-					$headerOverrideIP = $_SERVER[$header];
241
+            foreach($headers as $header) {
242
+                if(!empty($_SERVER[$header])) {
243
+                    $headerOverrideIP = $_SERVER[$header];
244 244
 
245
-					break;
246
-				}
247
-			}
248
-		}
245
+                    break;
246
+                }
247
+            }
248
+        }
249 249
 
250 250
         $proxy = Injector::inst()->create(TrustedProxyMiddleware::class);
251 251
 
252
-		if ($headerOverrideIP) {
253
-			return $proxy->getIPFromHeaderValue($headerOverrideIP);
254
-		}
252
+        if ($headerOverrideIP) {
253
+            return $proxy->getIPFromHeaderValue($headerOverrideIP);
254
+        }
255 255
 
256 256
         if (isset($_SERVER['REMOTE_ADDR'])) {
257
-			return $_SERVER['REMOTE_ADDR'];
258
-		}
257
+            return $_SERVER['REMOTE_ADDR'];
258
+        }
259 259
 
260 260
         return '';
261
-	}
261
+    }
262 262
 
263 263
 }
Please login to merge, or discard this patch.