Completed
Push — newinternal ( fe35c3...45827b )
by Simon
16s queued 13s
created
includes/Security/CredentialProviders/ScratchTokenCredentialProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,15 +62,15 @@
 block discarded – undo
62 62
 
63 63
         $usedToken = null;
64 64
         foreach ($scratchTokens as $scratchToken) {
65
-            if (password_verify($data, $scratchToken)){
65
+            if (password_verify($data, $scratchToken)) {
66 66
                 $usedToken = $scratchToken;
67 67
                 SessionAlert::quick("Hey, it looks like you used a scratch token to log in. Would you like to change your multi-factor authentication configuration?", 'alert-warning');
68
-                WebRequest::setPostLoginRedirect($this->getConfiguration()->getBaseUrl() . "/internal.php/multiFactor");
68
+                WebRequest::setPostLoginRedirect($this->getConfiguration()->getBaseUrl()."/internal.php/multiFactor");
69 69
                 break;
70 70
             }
71 71
         }
72 72
 
73
-        if($usedToken === null) {
73
+        if ($usedToken === null) {
74 74
             return false;
75 75
         }
76 76
 
Please login to merge, or discard this patch.
includes/Pages/PageUserManagement.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         $userSearchRequest = WebRequest::getString('usersearch');
41 41
         if ($userSearchRequest !== null) {
42 42
             $searchedUser = User::getByUsername($userSearchRequest, $database);
43
-            if($searchedUser !== false) {
43
+            if ($searchedUser !== false) {
44 44
                 $this->redirect('statistics/users', 'detail', ['user' => $searchedUser->getId()]);
45 45
                 return;
46 46
             }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                     continue;
135 135
                 }
136 136
 
137
-                $newValue = WebRequest::postBoolean('role-' . $name) ? 1 : 0;
137
+                $newValue = WebRequest::postBoolean('role-'.$name) ? 1 : 0;
138 138
                 if ($newValue !== $r['active']) {
139 139
                     if ($newValue === 0) {
140 140
                         $delete[] = $r['object'];
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             $user->save();
178 178
 
179 179
             $this->getNotificationHelper()->userRolesEdited($user, $reason);
180
-            SessionAlert::quick('Roles changed for user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
180
+            SessionAlert::quick('Roles changed for user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
181 181
 
182 182
             $this->redirect('statistics/users', 'detail', array('user' => $user->getId()));
183 183
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             Logger::suspendedUser($database, $user, $reason);
231 231
 
232 232
             $this->getNotificationHelper()->userSuspended($user, $reason);
233
-            SessionAlert::quick('Suspended user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
233
+            SessionAlert::quick('Suspended user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
234 234
 
235 235
             // send email
236 236
             $this->sendStatusChangeEmail(
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
             Logger::declinedUser($database, $user, $reason);
292 292
 
293 293
             $this->getNotificationHelper()->userDeclined($user, $reason);
294
-            SessionAlert::quick('Declined user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
294
+            SessionAlert::quick('Declined user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
295 295
 
296 296
             // send email
297 297
             $this->sendStatusChangeEmail(
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
             Logger::approvedUser($database, $user);
347 347
 
348 348
             $this->getNotificationHelper()->userApproved($user);
349
-            SessionAlert::quick('Approved user ' . htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
349
+            SessionAlert::quick('Approved user '.htmlentities($user->getUsername(), ENT_COMPAT, 'UTF-8'));
350 350
 
351 351
             // send email
352 352
             $this->sendStatusChangeEmail(
Please login to merge, or discard this patch.
includes/Pages/PageXffDemo.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,13 +36,13 @@  discard block
 block discarded – undo
36 36
                 'ip' => '172.16.0.164',
37 37
                 'routable' => false,
38 38
 
39
-            ],[
39
+            ], [
40 40
                 'trust' => true,
41 41
                 'ip' => '198.51.100.123',
42 42
                 'routable' => true,
43 43
                 'rdns' => 'trustedproxy.example.com',
44 44
 
45
-            ],[
45
+            ], [
46 46
                 'trust' => true,
47 47
                 'ip' => '192.0.2.1',
48 48
                 'routable' => true,
@@ -63,14 +63,14 @@  discard block
 block discarded – undo
63 63
                 'ip' => '172.16.0.164',
64 64
                 'routable' => false,
65 65
 
66
-            ],[
66
+            ], [
67 67
                 'trust' => false,
68 68
                 'ip' => '198.51.100.234',
69 69
                 'routable' => true,
70 70
                 'rdns' => 'sketchyproxy.example.com',
71 71
                 'showlinks' => true
72 72
 
73
-            ],[
73
+            ], [
74 74
                 'trust' => false,
75 75
                 'ip' => '192.0.2.1',
76 76
                 'routable' => true,
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
                 'ip' => '172.16.0.164',
92 92
                 'routable' => false,
93 93
 
94
-            ],[
94
+            ], [
95 95
                 'trust' => true,
96 96
                 'ip' => '198.51.100.123',
97 97
                 'routable' => true,
98 98
                 'rdns' => 'trustedproxy.example.com',
99
-            ],[
99
+            ], [
100 100
                 'trust' => false,
101 101
                 'ip' => '198.51.100.234',
102 102
                 'routable' => true,
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
                 'routable' => true,
110 110
                 'rdns' => 'trustedproxy2.example.com',
111 111
                 'showlinks' => true
112
-            ],[
112
+            ], [
113 113
                 'trust' => false,
114 114
                 'ip' => '192.0.2.1',
115 115
                 'routable' => true,
Please login to merge, or discard this patch.
includes/Pages/UserAuth/PageForgotPassword.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
     {
153 153
         $user = User::getById($id, $database);
154 154
 
155
-        if ($user === false ||  $user->isCommunityUser()) {
155
+        if ($user === false || $user->isCommunityUser()) {
156 156
             throw new ApplicationLogicException("Password reset failed. Please try again.");
157 157
         }
158 158
 
Please login to merge, or discard this patch.
includes/Tasks/JsonApiPageBase.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             $CORSallowed = $this->getSiteConfiguration()->getCrossOriginResourceSharingHosts();
34 34
 
35 35
             if (in_array($httpOrigin, $CORSallowed)) {
36
-                header("Access-Control-Allow-Origin: " . $httpOrigin);
36
+                header("Access-Control-Allow-Origin: ".$httpOrigin);
37 37
             }
38 38
         }
39 39
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
         $targetVar = WebRequest::getString('targetVariable');
72 72
         if ($targetVar !== null && preg_match('/^[a-z]+$/', $targetVar)) {
73
-            $data = $targetVar . ' = ' . $data . ';';
73
+            $data = $targetVar.' = '.$data.';';
74 74
             header("Content-Type: text/javascript");
75 75
         } else {
76 76
             header("Content-Type: application/json");
Please login to merge, or discard this patch.