Passed
Push — rbac ( 82b65f...a43d05 )
by Michael
02:23
created
smarty-plugins/modifier.date.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@
 block discarded – undo
24 24
         $dateString = $date->format('Y-m-d H:i:s');
25 25
 
26 26
         return $dateString;
27
-    }
28
-    else {
27
+    } else {
29 28
         return $input;
30 29
     }
31 30
 }
32 31
\ No newline at end of file
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
         $then = new DateTime($input);
28 27
     }
29 28
 
@@ -48,29 +47,21 @@  discard block
 block discarded – undo
48 47
     if ($secs <= 10) {
49 48
         $output = "just now";
50 49
         $pluralise = false;
51
-    }
52
-    elseif ($secs > 10 && $secs < $minuteCut) {
50
+    } elseif ($secs > 10 && $secs < $minuteCut) {
53 51
         $output = round($secs / $second) . " second";
54
-    }
55
-    elseif ($secs >= $minuteCut && $secs < $hourCut) {
52
+    } elseif ($secs >= $minuteCut && $secs < $hourCut) {
56 53
         $output = round($secs / $minute) . " minute";
57
-    }
58
-    elseif ($secs >= $hourCut && $secs < $dayCut) {
54
+    } elseif ($secs >= $hourCut && $secs < $dayCut) {
59 55
         $output = round($secs / $hour) . " hour";
60
-    }
61
-    elseif ($secs >= $dayCut && $secs < $weekCut) {
56
+    } elseif ($secs >= $dayCut && $secs < $weekCut) {
62 57
         $output = round($secs / $day) . " day";
63
-    }
64
-    elseif ($secs >= $weekCut && $secs < $monthCut) {
58
+    } elseif ($secs >= $weekCut && $secs < $monthCut) {
65 59
         $output = round($secs / $week) . " week";
66
-    }
67
-    elseif ($secs >= $monthCut && $secs < $yearCut) {
60
+    } elseif ($secs >= $monthCut && $secs < $yearCut) {
68 61
         $output = round($secs / $month) . " month";
69
-    }
70
-    elseif ($secs >= $yearCut && $secs < $year * 10) {
62
+    } elseif ($secs >= $yearCut && $secs < $year * 10) {
71 63
         $output = round($secs / $year) . " year";
72
-    }
73
-    else {
64
+    } else {
74 65
         $output = "a long time ago";
75 66
         $pluralise = false;
76 67
     }
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
@@ -37,13 +37,11 @@
 block discarded – undo
37 37
             echo 'Error resolving hostname, it doesn\'t look like this domain exists.';
38 38
             die();
39 39
         }
40
-    }
41
-    else {
40
+    } else {
42 41
         $data = htmlentities($data, ENT_COMPAT, 'UTF-8');
43 42
     }
44 43
 
45 44
     echo '<script>window.location.href="' . str_replace("%DATA%", $data, $toolList[$tool]) . '"</script>';
46
-}
47
-else {
45
+} else {
48 46
     header("Location: " . $_SERVER["REQUEST_URI"] . "&round2=true");
49 47
 }
Please login to merge, or discard this patch.