Completed
Push — newinternal-releasecandidate ( 45827b...b95206 )
by Simon
08:27
created
includes/Tasks/PageBase.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
             $targetScriptName = $currentScriptName;
253 253
         }
254 254
         else {
255
-            $targetScriptName = $this->getSiteConfiguration()->getBaseUrl() . '/' . $script;
255
+            $targetScriptName = $this->getSiteConfiguration()->getBaseUrl().'/'.$script;
256 256
         }
257 257
 
258 258
         $pathInfo = array($targetScriptName);
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         $url = implode('/', $pathInfo);
267 267
 
268 268
         if (is_array($parameters) && count($parameters) > 0) {
269
-            $url .= '?' . http_build_query($parameters);
269
+            $url .= '?'.http_build_query($parameters);
270 270
         }
271 271
 
272 272
         $this->redirectUrl($url);
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
      * @param string $path The path (relative to the application root) of the file
312 312
      */
313 313
     final protected function addCss($path) {
314
-        if(in_array($path, $this->extraCss)){
314
+        if (in_array($path, $this->extraCss)) {
315 315
             // nothing to do
316 316
             return;
317 317
         }
@@ -324,8 +324,8 @@  discard block
 block discarded – undo
324 324
      *
325 325
      * @param string $path The path (relative to the application root) of the file
326 326
      */
327
-    final protected function addJs($path){
328
-        if(in_array($path, $this->extraJs)){
327
+    final protected function addJs($path) {
328
+        if (in_array($path, $this->extraJs)) {
329 329
             // nothing to do
330 330
             return;
331 331
         }
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
      */
349 349
     final protected function setHtmlTitle($title)
350 350
     {
351
-        $this->htmlTitle = $this->smarty->fetch('string:' . $title);
351
+        $this->htmlTitle = $this->smarty->fetch('string:'.$title);
352 352
     }
353 353
 
354 354
     public function execute()
Please login to merge, or discard this patch.
includes/Pages/UserAuth/MultiFactor/PageMultiFactor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                     SessionAlert::success('Enabled YubiKey OTP.');
78 78
 
79 79
                     $scratchProvider = new ScratchTokenCredentialProvider($database, $this->getSiteConfiguration());
80
-                    if($scratchProvider->getRemaining($currentUser->getId()) < 3) {
80
+                    if ($scratchProvider->getRemaining($currentUser->getId()) < 3) {
81 81
                         $scratchProvider->setCredential($currentUser, 2, null);
82 82
                         $tokens = $scratchProvider->getTokens();
83 83
                         $this->assign('tokens', $tokens);
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                     }
87 87
                 }
88 88
                 catch (ApplicationLogicException $ex) {
89
-                    SessionAlert::error('Error enabling YubiKey OTP: ' . $ex->getMessage());
89
+                    SessionAlert::error('Error enabling YubiKey OTP: '.$ex->getMessage());
90 90
                 }
91 91
 
92 92
                 $this->redirect('multiFactor');
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                         SessionAlert::success('Enabled TOTP.');
178 178
 
179 179
                         $scratchProvider = new ScratchTokenCredentialProvider($database, $this->getSiteConfiguration());
180
-                        if($scratchProvider->getRemaining($currentUser->getId()) < 3) {
180
+                        if ($scratchProvider->getRemaining($currentUser->getId()) < 3) {
181 181
                             $scratchProvider->setCredential($currentUser, 2, null);
182 182
                             $tokens = $scratchProvider->getTokens();
183 183
                             $this->assign('tokens', $tokens);
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 
258 258
                     list($data, $reqs) = $otpCredentialProvider->getRegistrationData();
259 259
 
260
-                    $u2fRequest =json_encode($data);
260
+                    $u2fRequest = json_encode($data);
261 261
                     $u2fSigns = json_encode($reqs);
262 262
 
263 263
                     $this->addJs('/vendor/yubico/u2flib-server/examples/assets/u2f-api.js');
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
                     SessionAlert::success('Enabled U2F.');
307 307
 
308 308
                     $scratchProvider = new ScratchTokenCredentialProvider($database, $this->getSiteConfiguration());
309
-                    if($scratchProvider->getRemaining($currentUser->getId()) < 3) {
309
+                    if ($scratchProvider->getRemaining($currentUser->getId()) < 3) {
310 310
                         $scratchProvider->setCredential($currentUser, 2, null);
311 311
                         $tokens = $scratchProvider->getTokens();
312 312
                         $this->assign('tokens', $tokens);
@@ -419,11 +419,11 @@  discard block
 block discarded – undo
419 419
 
420 420
             if ($result) {
421 421
                 $otpCredentialProvider->deleteCredential($currentUser);
422
-                SessionAlert::success('Disabled ' . $factorType . '.');
422
+                SessionAlert::success('Disabled '.$factorType.'.');
423 423
                 $this->redirect('multiFactor');
424 424
             }
425 425
             else {
426
-                SessionAlert::error('Error disabling ' . $factorType . ' - invalid credentials.');
426
+                SessionAlert::error('Error disabling '.$factorType.' - invalid credentials.');
427 427
                 $this->redirect('multiFactor');
428 428
             }
429 429
         }
Please login to merge, or discard this patch.
includes/Security/ContentSecurityPolicyManager.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
     public function getNonce()
28 28
     {
29
-        if($this->nonce === null) {
29
+        if ($this->nonce === null) {
30 30
             $this->nonce = base64_encode(openssl_random_pseudo_bytes(32));
31 31
         }
32 32
 
@@ -36,14 +36,14 @@  discard block
 block discarded – undo
36 36
     public function getHeader() : string
37 37
     {
38 38
         $reportOnly = '';
39
-        if($this->reportOnly) {
39
+        if ($this->reportOnly) {
40 40
             $reportOnly = '-Report-Only';
41 41
         }
42 42
 
43 43
         $constructedPolicy = "Content-Security-Policy{$reportOnly}: ";
44 44
 
45 45
         foreach ($this->policy as $item => $values) {
46
-            $constructedPolicy .= $item . ' ';
46
+            $constructedPolicy .= $item.' ';
47 47
 
48 48
             if (count($values) > 0) {
49 49
                 foreach ($values as $value) {
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
                             $constructedPolicy .= "'{$value}' ";
55 55
                             break;
56 56
                         case 'nonce':
57
-                            if($this->nonce !== null) {
57
+                            if ($this->nonce !== null) {
58 58
                                 $constructedPolicy .= "'nonce-{$this->nonce}' ";
59 59
                             }
60 60
                             break;
61 61
                         default:
62
-                            $constructedPolicy .= $value . ' ';
62
+                            $constructedPolicy .= $value.' ';
63 63
                             break;
64 64
                     }
65 65
                 }
Please login to merge, or discard this patch.