Passed
Push — dependabot/composer/fortawesom... ( b43113 )
by
unknown
05:17
created
includes/Pages/Request/PageConfirmEmail.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,7 @@
 block discarded – undo
48 48
 
49 49
         if ($request->getEmailConfirm() === $si) {
50 50
             $request->setEmailConfirm('Confirmed');
51
-        }
52
-        else {
51
+        } else {
53 52
             throw new ApplicationLogicException('The confirmation value does not appear to match the expected value');
54 53
         }
55 54
 
Please login to merge, or discard this patch.
includes/Pages/PageTeam.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@
 block discarded – undo
29 29
         foreach ($teamData as $name => $item) {
30 30
             if (count($item['Role']) == 0) {
31 31
                 $inactive[$name] = $item;
32
-            }
33
-            else {
32
+            } else {
34 33
                 $active[$name] = $item;
35 34
             }
36 35
         }
Please login to merge, or discard this patch.
includes/Pages/RequestAction/PageCustomClose.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -42,8 +42,7 @@  discard block
 block discarded – undo
42 42
             $this->doCustomClose($currentUser, $request, $database);
43 43
 
44 44
             $this->redirect();
45
-        }
46
-        else {
45
+        } else {
47 46
             $this->assignCSRFToken();
48 47
             $this->showCustomCloseForm($database, $request);
49 48
         }
@@ -185,16 +184,14 @@  discard block
 block discarded – undo
185 184
 
186 185
             // Send the mail after the save, since save can be rolled back
187 186
             $this->sendMail($request, $messageBody, $currentUser, $ccMailingList);
188
-        }
189
-        else {
187
+        } else {
190 188
             if (array_key_exists($action, $availableRequestStates)) {
191 189
                 // Defer to other state
192 190
                 $this->deferRequest($request, $database, $action, $availableRequestStates, $messageBody);
193 191
 
194 192
                 // Send the mail after the save, since save can be rolled back
195 193
                 $this->sendMail($request, $messageBody, $currentUser, $ccMailingList);
196
-            }
197
-            else {
194
+            } else {
198 195
                 $request->setReserved(null);
199 196
                 $request->setUpdateVersion(WebRequest::postInt('updateversion'));
200 197
                 $request->save();
@@ -236,8 +233,7 @@  discard block
 block discarded – undo
236 233
         if ($action == EmailTemplate::CREATED) {
237 234
             $logCloseType = 'custom-y';
238 235
             $notificationCloseType = "Custom, Created";
239
-        }
240
-        else {
236
+        } else {
241 237
             $logCloseType = 'custom-n';
242 238
             $notificationCloseType = "Custom, Not Created";
243 239
         }
Please login to merge, or discard this patch.
includes/Offline.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,7 @@
 block discarded – undo
48 48
 
49 49
         if ($external) {
50 50
             return $smarty->fetch("offline/external.tpl");
51
-        }
52
-        else {
51
+        } else {
53 52
             $hideCulprit = true;
54 53
 
55 54
             // Use the provided message if possible
Please login to merge, or discard this patch.
includes/Router/RequestRouter.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -340,8 +340,7 @@  discard block
 block discarded – undo
340 340
         if (count($pathInfo) === 0) {
341 341
             // No pathInfo, so no page to load. Load the main page.
342 342
             return $this->getDefaultRoute();
343
-        }
344
-        elseif (count($pathInfo) === 1) {
343
+        } elseif (count($pathInfo) === 1) {
345 344
             // Exactly one path info segment, it's got to be a page.
346 345
             $classSegment = $pathInfo[0];
347 346
 
@@ -353,8 +352,7 @@  discard block
 block discarded – undo
353 352
             // Let's handle more than two, and collapse it down into two.
354 353
             $requestedAction = array_pop($pathInfo);
355 354
             $classSegment = implode('/', $pathInfo);
356
-        }
357
-        else {
355
+        } else {
358 356
             // Two path info segments.
359 357
             $classSegment = $pathInfo[0];
360 358
             $requestedAction = $pathInfo[1];
@@ -383,8 +381,7 @@  discard block
 block discarded – undo
383 381
             $action = 'main';
384 382
 
385 383
             return array($pageClass, $action);
386
-        }
387
-        else {
384
+        } else {
388 385
             // Doesn't exist in map. Fall back to 404
389 386
             $pageClass = Page404::class;
390 387
             $action = "main";
@@ -413,16 +410,14 @@  discard block
 block discarded – undo
413 410
                 $action = $requestedAction;
414 411
 
415 412
                 return array($pageClass, $action);
416
-            }
417
-            else {
413
+            } else {
418 414
                 // Valid page, invalid action. 404 our way out.
419 415
                 $pageClass = Page404::class;
420 416
                 $action = 'main';
421 417
 
422 418
                 return array($pageClass, $action);
423 419
             }
424
-        }
425
-        else {
420
+        } else {
426 421
             // Class doesn't exist in map. Fall back to 404
427 422
             $pageClass = Page404::class;
428 423
             $action = 'main';
Please login to merge, or discard this patch.
redir.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,13 +40,11 @@
 block discarded – undo
40 40
             echo 'Error resolving hostname, it doesn\'t look like this domain exists.';
41 41
             die();
42 42
         }
43
-    }
44
-    else {
43
+    } else {
45 44
         $data = urlencode($data);
46 45
     }
47 46
 
48 47
     echo '<script>window.location.href=' . json_encode(str_replace("%DATA%", $data, $toolList[$tool])) . '</script>';
49
-}
50
-else {
48
+} else {
51 49
     header("Location: " . $_SERVER["REQUEST_URI"] . "&round2=true");
52 50
 }
Please login to merge, or discard this patch.
smarty-plugins/modifier.relativedate.php 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@  discard block
 block discarded – undo
22 22
         && (get_class($input) === DateTime::class || get_class($input) === DateTimeImmutable::class)
23 23
     ) {
24 24
         $then = $input;
25
-    }
26
-    else {
25
+    } else {
27 26
         try {
28 27
             $then = new DateTime($input);
29 28
         }
@@ -53,29 +52,21 @@  discard block
 block discarded – undo
53 52
     if ($secs <= 10) {
54 53
         $output = "just now";
55 54
         $pluralise = false;
56
-    }
57
-    elseif ($secs > 10 && $secs < $minuteCut) {
55
+    } elseif ($secs > 10 && $secs < $minuteCut) {
58 56
         $output = round($secs / $second) . " second";
59
-    }
60
-    elseif ($secs >= $minuteCut && $secs < $hourCut) {
57
+    } elseif ($secs >= $minuteCut && $secs < $hourCut) {
61 58
         $output = round($secs / $minute) . " minute";
62
-    }
63
-    elseif ($secs >= $hourCut && $secs < $dayCut) {
59
+    } elseif ($secs >= $hourCut && $secs < $dayCut) {
64 60
         $output = round($secs / $hour) . " hour";
65
-    }
66
-    elseif ($secs >= $dayCut && $secs < $weekCut) {
61
+    } elseif ($secs >= $dayCut && $secs < $weekCut) {
67 62
         $output = round($secs / $day) . " day";
68
-    }
69
-    elseif ($secs >= $weekCut && $secs < $monthCut) {
63
+    } elseif ($secs >= $weekCut && $secs < $monthCut) {
70 64
         $output = round($secs / $week) . " week";
71
-    }
72
-    elseif ($secs >= $monthCut && $secs < $yearCut) {
65
+    } elseif ($secs >= $monthCut && $secs < $yearCut) {
73 66
         $output = round($secs / $month) . " month";
74
-    }
75
-    elseif ($secs >= $yearCut && $secs < $year * 10) {
67
+    } elseif ($secs >= $yearCut && $secs < $year * 10) {
76 68
         $output = round($secs / $year) . " year";
77
-    }
78
-    else {
69
+    } else {
79 70
         $output = "a long time ago";
80 71
         $pluralise = false;
81 72
     }
Please login to merge, or discard this patch.
includes/Security/ContentSecurityPolicyManager.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,8 +94,7 @@
 block discarded – undo
94 94
                 if (!$policyIsSet) {
95 95
                     $constructedPolicy .= "'none' ";
96 96
                 }
97
-            }
98
-            else {
97
+            } else {
99 98
                 $constructedPolicy .= "'none' ";
100 99
             }
101 100
 
Please login to merge, or discard this patch.
includes/Security/CredentialProviders/ScratchTokenCredentialProvider.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 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 68
                 WebRequest::setPostLoginRedirect($this->getConfiguration()->getBaseUrl() . "/internal.php/multiFactor");
Please login to merge, or discard this patch.