Test Setup Failed
Push — irc-comment-visibility-fix ( 1f25c9...574aa6 )
by Michael
10:52
created
includes/Router/PublicRequestRouter.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@
 block discarded – undo
59 59
         if (count($pathInfo) === 3 && $pathInfo[0] === 'r') {
60 60
             // this request should be routed to the dynamic request form handler
61 61
             return [PageRequestAccount::class, 'dynamic'];
62
-        }
63
-        else {
62
+        } else {
64 63
             return parent::getRouteFromPath($pathInfo);
65 64
         }
66 65
     }
Please login to merge, or discard this patch.
includes/Helpers/MediaWikiHelper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -228,8 +228,7 @@
 block discarded – undo
228 228
                 foreach ($req->fields as $name => $data) {
229 229
                     if ($data->type === 'checkbox') {
230 230
                         $checkboxFields[] = $name;
231
-                    }
232
-                    else {
231
+                    } else {
233 232
                         $requiredFields[] = $name;
234 233
                     }
235 234
                 }
Please login to merge, or discard this patch.
includes/Helpers/BotMediaWikiClient.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -72,12 +72,10 @@  discard block
 block discarded – undo
72 72
             $userinfoResult = $this->callApi(array('action' => 'query', 'meta' => 'userinfo'), 'GET');
73 73
             if (isset($userinfoResult->query->userinfo->anon)) {
74 74
                 throw new MediaWikiApiException('Unable to log in.');
75
-            }
76
-            else {
75
+            } else {
77 76
                 $this->knownLoggedIn = true;
78 77
             }
79
-        }
80
-        else {
78
+        } else {
81 79
             $this->knownLoggedIn = true;
82 80
         }
83 81
     }
@@ -96,11 +94,9 @@  discard block
 block discarded – undo
96 94
 
97 95
         if ($method == 'GET') {
98 96
             $data = $this->httpHelper->get($this->mediawikiWebServiceEndpoint, $apiParams);
99
-        }
100
-        elseif ($method == 'POST') {
97
+        } elseif ($method == 'POST') {
101 98
             $data = $this->httpHelper->post($this->mediawikiWebServiceEndpoint, $apiParams);
102
-        }
103
-        else {
99
+        } else {
104 100
             throw new ApplicationLogicException('Unsupported HTTP Method');
105 101
         }
106 102
 
Please login to merge, or discard this patch.
includes/Helpers/Logger.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,8 +74,7 @@
 block discarded – undo
74 74
 
75 75
         if ($domain !== null) {
76 76
             $log->setDomain($domain);
77
-        }
78
-        elseif (method_exists($object, 'getDomain')) {
77
+        } elseif (method_exists($object, 'getDomain')) {
79 78
             $log->setDomain($object->getDomain());
80 79
         }
81 80
 
Please login to merge, or discard this patch.
includes/Helpers/IrcNotificationHelper.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -101,8 +101,7 @@  discard block
 block discarded – undo
101 101
             $amqpConfig = $this->siteConfiguration->getAmqpConfiguration();
102 102
             if ($amqpConfig['tls']) {
103 103
                 $connection = new AMQPSSLConnection($amqpConfig['host'], $amqpConfig['port'], $amqpConfig['user'], $amqpConfig['password'], $amqpConfig['vhost'], ['verify_peer' => true]);
104
-            }
105
-            else {
104
+            } else {
106 105
                 $connection = new AMQPStreamConnection($amqpConfig['host'], $amqpConfig['port'], $amqpConfig['user'], $amqpConfig['password'], $amqpConfig['vhost']);
107 106
             }
108 107
             $channel = $connection->channel();
@@ -255,8 +254,7 @@  discard block
 block discarded – undo
255 254
     {
256 255
         if ($ban->getDuration() === null) {
257 256
             $duration = "indefinitely";
258
-        }
259
-        else {
257
+        } else {
260 258
             $duration = "until " . date("F j, Y, g:i a", $ban->getDuration());
261 259
         }
262 260
 
@@ -264,8 +262,7 @@  discard block
 block discarded – undo
264 262
 
265 263
         if ($ban->getVisibility() == 'user') {
266 264
             $this->send("Ban {$ban->getId()} set by {$username} for '{$ban->getReason()}' {$duration}");
267
-        }
268
-        else {
265
+        } else {
269 266
             $this->send("Ban {$ban->getId()} set by {$username} {$duration}");
270 267
         }
271 268
     }
Please login to merge, or discard this patch.
includes/Helpers/LogHelper.php 1 patch
Braces   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,7 +57,8 @@  discard block
 block discarded – undo
57 57
          *
58 58
          * @return int
59 59
          */
60
-        $sortKey = function(DataObject $item) {
60
+        $sortKey = function(DataObject $item)
61
+        {
61 62
             if ($item instanceof Log) {
62 63
                 return $item->getTimestamp()->getTimestamp();
63 64
             }
@@ -378,8 +379,7 @@  discard block
 block discarded – undo
378 379
                 // some old templates have been completely deleted and lost to the depths of time.
379 380
                 if ($welcomeTemplate === false) {
380 381
                     return "Welcome template #{$objectId}";
381
-                }
382
-                else {
382
+                } else {
383 383
                     $userCode = htmlentities($welcomeTemplate->getUserCode(), ENT_COMPAT, 'UTF-8');
384 384
 
385 385
                     return "<a href=\"{$baseurl}/internal.php/welcomeTemplates/view?template={$objectId}\">{$userCode}</a>";
@@ -397,8 +397,7 @@  discard block
 block discarded – undo
397 397
                 $task = $job->getTask();
398 398
                 if (isset($taskDescriptions[$task])) {
399 399
                     $description = $taskDescriptions[$task];
400
-                }
401
-                else {
400
+                } else {
402 401
                     $description = 'Unknown task';
403 402
                 }
404 403
 
Please login to merge, or discard this patch.
includes/Helpers/SearchHelpers/LogSearchHelper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@
 block discarded – undo
38 38
 
39 39
         if ($domain === null) {
40 40
             $helper->whereClause .= ' AND domain IS NULL';
41
-        }
42
-        else {
41
+        } else {
43 42
             $helper->whereClause .= ' AND coalesce(domain, ?) = ?';
44 43
             $helper->parameterList[] = $domain;
45 44
             $helper->parameterList[] = $domain;
Please login to merge, or discard this patch.
includes/IdentificationVerifier.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,14 +77,12 @@
 block discarded – undo
77 77
     {
78 78
         if ($this->checkIdentificationCache($onWikiName)) {
79 79
             return true;
80
-        }
81
-        else {
80
+        } else {
82 81
             if ($this->isIdentifiedOnWiki($onWikiName)) {
83 82
                 $this->cacheIdentificationStatus($onWikiName);
84 83
 
85 84
                 return true;
86
-            }
87
-            else {
85
+            } else {
88 86
                 return false;
89 87
             }
90 88
         }
Please login to merge, or discard this patch.
includes/ExceptionHandler.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,8 +65,7 @@  discard block
 block discarded – undo
65 65
             ob_end_clean();
66 66
 
67 67
             $message = str_replace('$2$', $textErrorData, $message);
68
-        }
69
-        else {
68
+        } else {
70 69
             $message = str_replace('$2$', "", $message);
71 70
         }
72 71
 
@@ -135,8 +134,7 @@  discard block
 block discarded – undo
135 134
 
136 135
         if ($fromGlobalHandler) {
137 136
             $errorData['globalHandler'] = true;
138
-        }
139
-        else {
137
+        } else {
140 138
             $errorData['globalHandler'] = false;
141 139
         }
142 140
 
Please login to merge, or discard this patch.