Failed Conditions
Push — newinternal-releasecandidate ( 327c61...a30d14 )
by Simon
15:28 queued 05:26
created
smarty-plugins/modifier.relativedate.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         try {
28 28
             $then = new DateTime($input);
29 29
         }
30
-        catch(Exception $ex) {
30
+        catch (Exception $ex) {
31 31
             return $input;
32 32
         }
33 33
     }
@@ -55,25 +55,25 @@  discard block
 block discarded – undo
55 55
         $pluralise = false;
56 56
     }
57 57
     elseif ($secs > 10 && $secs < $minuteCut) {
58
-        $output = round($secs / $second) . " second";
58
+        $output = round($secs / $second)." second";
59 59
     }
60 60
     elseif ($secs >= $minuteCut && $secs < $hourCut) {
61
-        $output = round($secs / $minute) . " minute";
61
+        $output = round($secs / $minute)." minute";
62 62
     }
63 63
     elseif ($secs >= $hourCut && $secs < $dayCut) {
64
-        $output = round($secs / $hour) . " hour";
64
+        $output = round($secs / $hour)." hour";
65 65
     }
66 66
     elseif ($secs >= $dayCut && $secs < $weekCut) {
67
-        $output = round($secs / $day) . " day";
67
+        $output = round($secs / $day)." day";
68 68
     }
69 69
     elseif ($secs >= $weekCut && $secs < $monthCut) {
70
-        $output = round($secs / $week) . " week";
70
+        $output = round($secs / $week)." week";
71 71
     }
72 72
     elseif ($secs >= $monthCut && $secs < $yearCut) {
73
-        $output = round($secs / $month) . " month";
73
+        $output = round($secs / $month)." month";
74 74
     }
75 75
     elseif ($secs >= $yearCut && $secs < $year * 10) {
76
-        $output = round($secs / $year) . " year";
76
+        $output = round($secs / $year)." year";
77 77
     }
78 78
     else {
79 79
         $output = "a long time ago";
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     }
82 82
 
83 83
     if ($pluralise) {
84
-        $output = (substr($output, 0, 2) <> "1 ") ? $output . "s ago" : $output . " ago";
84
+        $output = (substr($output, 0, 2) <> "1 ") ? $output."s ago" : $output." ago";
85 85
     }
86 86
 
87 87
     return $output;
Please login to merge, or discard this patch.
includes/DataObjects/User.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -549,7 +549,8 @@
 block discarded – undo
549 549
      *
550 550
      * @return bool|null
551 551
      */
552
-    public function getForceIdentified() {
552
+    public function getForceIdentified()
553
+    {
553 554
         return $this->forceidentified;
554 555
     }
555 556
 
Please login to merge, or discard this patch.
includes/Background/BackgroundTaskBase.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             throw new ApplicationLogicException('Cannot locate request');
178 178
         }
179 179
 
180
-        if($this->job->getEmailTemplate() !== null){
180
+        if ($this->job->getEmailTemplate() !== null) {
181 181
             $this->emailTemplate = EmailTemplate::getById($this->job->getEmailTemplate(), $this->getDatabase());
182 182
 
183 183
             if ($this->emailTemplate === false) {
@@ -185,20 +185,20 @@  discard block
 block discarded – undo
185 185
             }
186 186
         }
187 187
 
188
-        if($this->job->getParameters() !== null) {
188
+        if ($this->job->getParameters() !== null) {
189 189
             $this->parameters = json_decode($this->job->getParameters());
190 190
 
191 191
             if (json_last_error() !== JSON_ERROR_NONE) {
192
-                throw new ApplicationLogicException('JSON decode: ' . json_last_error_msg());
192
+                throw new ApplicationLogicException('JSON decode: '.json_last_error_msg());
193 193
             }
194 194
         }
195 195
 
196 196
         // Should we wait for a parent job?
197
-        if($this->job->getParent() !== null) {
197
+        if ($this->job->getParent() !== null) {
198 198
             /** @var JobQueue $parentJob */
199 199
             $parentJob = JobQueue::getById($this->job->getParent(), $this->getDatabase());
200 200
 
201
-            if($parentJob === false) {
201
+            if ($parentJob === false) {
202 202
                 $this->markFailed("Parent job could not be found");
203 203
                 return;
204 204
             }
Please login to merge, or discard this patch.
includes/Pages/Statistics/StatsUsers.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@
 block discarded – undo
147 147
         $oauth = new OAuthUserHelper($user, $database, $this->getOAuthProtocolHelper(), $this->getSiteConfiguration());
148 148
         $this->assign('oauth', $oauth);
149 149
 
150
-        if($user->getForceIdentified() === null) {
150
+        if ($user->getForceIdentified() === null) {
151 151
             $idVerifier = new IdentificationVerifier($this->getHttpHelper(), $this->getSiteConfiguration(), $this->getDatabase());
152 152
             $this->assign('identificationStatus', $idVerifier->isUserIdentified($user->getOnWikiName()) ? 'detected' : 'missing');
153 153
         } else {
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,8 @@
 block discarded – undo
150 150
         if($user->getForceIdentified() === null) {
151 151
             $idVerifier = new IdentificationVerifier($this->getHttpHelper(), $this->getSiteConfiguration(), $this->getDatabase());
152 152
             $this->assign('identificationStatus', $idVerifier->isUserIdentified($user->getOnWikiName()) ? 'detected' : 'missing');
153
-        } else {
153
+        }
154
+        else {
154 155
             $this->assign('identificationStatus', $user->getForceIdentified() == 1 ? 'forced-on' : 'forced-off');
155 156
         }
156 157
 
Please login to merge, or discard this patch.
includes/Pages/UserAuth/PageLogout.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     protected function main()
21 21
     {
22
-        if(WebRequest::wasPosted()) {
22
+        if (WebRequest::wasPosted()) {
23 23
             Session::destroy();
24 24
             $this->redirect("login");
25 25
             return;
Please login to merge, or discard this patch.
includes/Helpers/OAuthUserHelper.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -193,14 +193,16 @@
 block discarded – undo
193 193
         return $this->partiallyLinked;
194 194
     }
195 195
 
196
-    public function canCreateAccount() {
196
+    public function canCreateAccount()
197
+    {
197 198
         return $this->isFullyLinked()
198 199
             && $this->getIdentity(true)->getGrantBasic()
199 200
             && $this->getIdentity(true)->getGrantHighVolume()
200 201
             && $this->getIdentity(true)->getGrantCreateAccount();
201 202
     }
202 203
 
203
-    public function canWelcome() {
204
+    public function canWelcome()
205
+    {
204 206
         return $this->isFullyLinked()
205 207
             && $this->getIdentity(true)->getGrantBasic()
206 208
             && $this->getIdentity(true)->getGrantHighVolume()
Please login to merge, or discard this patch.
includes/ConsoleTasks/RunJobQueueTask.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                 // Create a task.
79 79
                 $taskName = $job->getTask();
80 80
 
81
-                if(!class_exists($taskName)) {
81
+                if (!class_exists($taskName)) {
82 82
                     throw new ApplicationLogicException('Job task does not exist');
83 83
                 }
84 84
 
@@ -132,6 +132,6 @@  discard block
 block discarded – undo
132 132
     }
133 133
 
134 134
     public static function errorHandler($errno, $errstr, $errfile, $errline) {
135
-        throw new Exception($errfile . "@" . $errline . ": " . $errstr);
135
+        throw new Exception($errfile."@".$errline.": ".$errstr);
136 136
     }
137 137
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,8 @@
 block discarded – undo
131 131
         $task->setNotificationHelper($this->getNotificationHelper());
132 132
     }
133 133
 
134
-    public static function errorHandler($errno, $errstr, $errfile, $errline) {
134
+    public static function errorHandler($errno, $errstr, $errfile, $errline)
135
+    {
135 136
         throw new Exception($errfile . "@" . $errline . ": " . $errstr);
136 137
     }
137 138
 }
Please login to merge, or discard this patch.
includes/API/Actions/JsTemplateConfirmsAction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
         $dataset = [];
28 28
         foreach ($templates as $tpl) {
29
-            if($tpl->getJsquestion() != "") {
29
+            if ($tpl->getJsquestion() != "") {
30 30
                 $dataset[$tpl->getId()] = $tpl->getJsquestion();
31 31
             }
32 32
         }
Please login to merge, or discard this patch.
includes/Pages/RequestAction/PageCloseRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
         if ($reservationId !== 0 && $reservationId !== null) {
134 134
             if ($currentUser->getId() !== $reservationId) {
135 135
                 SessionAlert::error("Request is reserved by someone else.");
136
-                $this->redirect('/viewRequest', null, ['id' => $request->getId()] );
136
+                $this->redirect('/viewRequest', null, ['id' => $request->getId()]);
137 137
                 return true;
138 138
             }
139 139
         }
Please login to merge, or discard this patch.