@@ -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; |
@@ -64,26 +64,26 @@ discard block |
||
64 | 64 | $options->setEnvironment($data); |
65 | 65 | break; |
66 | 66 | case 'tags': |
67 | - Hub::getCurrent()->configureScope(function (Scope $scope) use($data) : void { |
|
67 | + Hub::getCurrent()->configureScope(function(Scope $scope) use($data) : void { |
|
68 | 68 | foreach ($data as $tagName => $tagData) { |
69 | 69 | $scope->setTag($tagName, $tagData); |
70 | 70 | } |
71 | 71 | }); |
72 | 72 | break; |
73 | 73 | case 'user': |
74 | - Hub::getCurrent()->configureScope(function (Scope $scope) use($data) : void { |
|
74 | + Hub::getCurrent()->configureScope(function(Scope $scope) use($data) : void { |
|
75 | 75 | $scope->setUser($data); |
76 | 76 | }); |
77 | 77 | break; |
78 | 78 | case 'extra': |
79 | - Hub::getCurrent()->configureScope(function (Scope $scope) use($data) : void { |
|
79 | + Hub::getCurrent()->configureScope(function(Scope $scope) use($data) : void { |
|
80 | 80 | foreach ($data as $extraKey => $extraData) { |
81 | 81 | $scope->setExtra($extraKey, $extraData); |
82 | 82 | } |
83 | 83 | }); |
84 | 84 | break; |
85 | 85 | case 'level': |
86 | - Hub::getCurrent()->configureScope(function (Scope $scope) use($data) : void { |
|
86 | + Hub::getCurrent()->configureScope(function(Scope $scope) use($data) : void { |
|
87 | 87 | $scope->setLevel(new Severity(strtolower($data))); |
88 | 88 | }); |
89 | 89 | break; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $options = Hub::getCurrent()->getClient()->getOptions(); |
104 | 104 | $data = []; |
105 | 105 | |
106 | - Hub::getCurrent()->configureScope(function (Scope $scope) use (&$data) : void { |
|
106 | + Hub::getCurrent()->configureScope(function(Scope $scope) use (&$data) : void { |
|
107 | 107 | $data['user'] = $scope->getUser(); |
108 | 108 | $data['tags'] = $scope->getTags(); |
109 | 109 | $data['extra'] = $scope->getExtra(); |