@@ -237,16 +237,15 @@ |
||
237 | 237 | |
238 | 238 | if (defined('TRUSTED_PROXY')) { |
239 | 239 | $headers = (defined('SS_TRUSTED_PROXY_IP_HEADER')) ? |
240 | - [SS_TRUSTED_PROXY_IP_HEADER] : |
|
241 | - null; |
|
240 | + [SS_TRUSTED_PROXY_IP_HEADER] : null; |
|
242 | 241 | |
243 | - if(!$headers) { |
|
242 | + if (!$headers) { |
|
244 | 243 | // Backwards compatible defaults |
245 | 244 | $headers = ['HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR']; |
246 | 245 | } |
247 | 246 | |
248 | - foreach($headers as $header) { |
|
249 | - if(!empty($_SERVER[$header])) { |
|
247 | + foreach ($headers as $header) { |
|
248 | + if (!empty($_SERVER[$header])) { |
|
250 | 249 | $headerOverrideIP = $_SERVER[$header]; |
251 | 250 | |
252 | 251 | break; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $this->context['env'] = $data; |
79 | 79 | break; |
80 | 80 | case 'tags': |
81 | - Hub::getCurrent()->configureScope(function (Scope $scope) use($data) : void { |
|
81 | + Hub::getCurrent()->configureScope(function(Scope $scope) use($data) : void { |
|
82 | 82 | foreach ($data as $tagName => $tagData) { |
83 | 83 | $scope->setTag($tagName, $tagData); |
84 | 84 | $this->context['tags'][$tagName] = $tagData; |
@@ -86,13 +86,13 @@ discard block |
||
86 | 86 | }); |
87 | 87 | break; |
88 | 88 | case 'user': |
89 | - Hub::getCurrent()->configureScope(function (Scope $scope) use($data) : void { |
|
89 | + Hub::getCurrent()->configureScope(function(Scope $scope) use($data) : void { |
|
90 | 90 | $scope->setUser($data, true); |
91 | 91 | $this->context['user'] = $data; |
92 | 92 | }); |
93 | 93 | break; |
94 | 94 | case 'extra': |
95 | - Hub::getCurrent()->configureScope(function (Scope $scope) use($data) : void { |
|
95 | + Hub::getCurrent()->configureScope(function(Scope $scope) use($data) : void { |
|
96 | 96 | foreach ($data as $extraKey => $extraData) { |
97 | 97 | $scope->setExtra($extraKey, $extraData); |
98 | 98 | $this->context['extra'][$extraKey] = $extraData; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | }); |
101 | 101 | break; |
102 | 102 | case 'level': |
103 | - Hub::getCurrent()->configureScope(function (Scope $scope) use($data) : void { |
|
103 | + Hub::getCurrent()->configureScope(function(Scope $scope) use($data) : void { |
|
104 | 104 | $scope->setLevel(new Severity(SentrySeverity::process_severity($level = $data))); |
105 | 105 | }); |
106 | 106 | break; |