Passed
Push — php8 ( ba1f07...3f2d85 )
by Michael
04:18 queued 03:36
created
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/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.
includes/Fragments/NavigationMenuAccessControl.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,8 @@
 block discarded – undo
113 113
      *
114 114
      * @return void
115 115
      */
116
-    public function setUpNavBarBadges(User $currentUser, PdoDatabase $database) {
116
+    public function setUpNavBarBadges(User $currentUser, PdoDatabase $database)
117
+    {
117 118
         // Set up some variables.
118 119
         // A size of 0 causes nothing to show up on the page (checked on navigation-menu.tpl) so leaving it 0 here is fine.
119 120
         $countOfFlagged = 0;
Please login to merge, or discard this patch.
includes/PdoDatabase.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,8 +97,7 @@
 block discarded – undo
97 97
         // all over the rest of the code
98 98
         if ($this->hasActiveTransaction) {
99 99
             return false;
100
-        }
101
-        else {
100
+        } else {
102 101
             $accessMode = 'READ WRITE';
103 102
 
104 103
             switch ($isolationLevel) {
Please login to merge, or discard this patch.
includes/DataObjects/Ban.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -155,12 +155,10 @@  discard block
 block discarded – undo
155 155
 
156 156
             if ($statement->execute()) {
157 157
                 $this->id = (int)$this->dbObject->lastInsertId();
158
-            }
159
-            else {
158
+            } else {
160 159
                 throw new Exception($statement->errorInfo());
161 160
             }
162
-        }
163
-        else {
161
+        } else {
164 162
             // update
165 163
             $statement = $this->dbObject->prepare(<<<SQL
166 164
 UPDATE `ban`
@@ -339,8 +337,7 @@  discard block
 block discarded – undo
339 337
     {
340 338
         if ($ip === null) {
341 339
             $this->ip = null;
342
-        }
343
-        else {
340
+        } else {
344 341
             $this->ip = inet_pton($ip);
345 342
         }
346 343
 
Please login to merge, or discard this patch.
includes/DataObjects/UserDomain.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,12 +37,10 @@
 block discarded – undo
37 37
 
38 38
             if ($statement->execute()) {
39 39
                 $this->id = (int)$this->dbObject->lastInsertId();
40
-            }
41
-            else {
40
+            } else {
42 41
                 throw new Exception($statement->errorInfo());
43 42
             }
44
-        }
45
-        else {
43
+        } else {
46 44
             // insert / delete only, no updates please.
47 45
             throw new Exception('Updating domain membership is not available');
48 46
         }
Please login to merge, or discard this patch.