Failed Conditions
Push — newinternal-releasecandidate ( 2e1778...b14046 )
by Simon
15:26 queued 05:35
created
includes/Security/CredentialProviders/TotpCredentialProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
      */
92 92
     public function setCredential(User $user, $factor, $data)
93 93
     {
94
-        $issuer = 'ACC - ' . $this->getConfiguration()->getIrcNotificationsInstance();
94
+        $issuer = 'ACC - '.$this->getConfiguration()->getIrcNotificationsInstance();
95 95
         $totp = TOTP::create();
96 96
         $totp->setLabel($user->getUsername());
97 97
         $totp->setIssuer($issuer);
Please login to merge, or discard this patch.
includes/Helpers/IrcNotificationHelper.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $blacklist = array("DCC", "CCTP", "PRIVMSG");
90 90
         $message = str_replace($blacklist, "(IRC Blacklist)", $message); // Lets stop DCC etc
91 91
 
92
-        $msg = IrcColourCode::RESET . IrcColourCode::BOLD . "[$instanceName]" . IrcColourCode::RESET . ": $message";
92
+        $msg = IrcColourCode::RESET.IrcColourCode::BOLD."[$instanceName]".IrcColourCode::RESET.": $message";
93 93
 
94 94
         try {
95 95
             $notification = new Notification();
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function userApproved(User $user)
129 129
     {
130
-        $this->send("{$user->getUsername()} approved by " . $this->currentUser->getUsername());
130
+        $this->send("{$user->getUsername()} approved by ".$this->currentUser->getUsername());
131 131
     }
132 132
 
133 133
     /**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      */
139 139
     public function userDeclined(User $user, $reason)
140 140
     {
141
-        $this->send("{$user->getUsername()} declined by " . $this->currentUser->getUsername() . " ($reason)");
141
+        $this->send("{$user->getUsername()} declined by ".$this->currentUser->getUsername()." ($reason)");
142 142
     }
143 143
 
144 144
     /**
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      */
150 150
     public function userSuspended(User $user, $reason)
151 151
     {
152
-        $this->send("{$user->getUsername()} suspended by " . $this->currentUser->getUsername() . " ($reason)");
152
+        $this->send("{$user->getUsername()} suspended by ".$this->currentUser->getUsername()." ($reason)");
153 153
     }
154 154
 
155 155
     /**
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      */
160 160
     public function userPrefChange(User $user)
161 161
     {
162
-        $this->send("{$user->getUsername()}'s preferences were changed by " . $this->currentUser->getUsername());
162
+        $this->send("{$user->getUsername()}'s preferences were changed by ".$this->currentUser->getUsername());
163 163
     }
164 164
 
165 165
     /**
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
      */
171 171
     public function userRenamed(User $user, $old)
172 172
     {
173
-        $this->send($this->currentUser->getUsername() . " renamed $old to {$user->getUsername()}");
173
+        $this->send($this->currentUser->getUsername()." renamed $old to {$user->getUsername()}");
174 174
     }
175 175
 
176 176
     /**
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     public function userRolesEdited(User $user, $reason)
181 181
     {
182 182
         $currentUser = $this->currentUser->getUsername();
183
-        $this->send("Active roles for {$user->getUsername()} changed by " . $currentUser . " ($reason)");
183
+        $this->send("Active roles for {$user->getUsername()} changed by ".$currentUser." ($reason)");
184 184
     }
185 185
 
186 186
     #endregion
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      */
193 193
     public function siteNoticeEdited()
194 194
     {
195
-        $this->send("Site notice edited by " . $this->currentUser->getUsername());
195
+        $this->send("Site notice edited by ".$this->currentUser->getUsername());
196 196
     }
197 197
     #endregion
198 198
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
      */
205 205
     public function welcomeTemplateCreated(WelcomeTemplate $template)
206 206
     {
207
-        $this->send("Welcome template {$template->getId()} created by " . $this->currentUser->getUsername());
207
+        $this->send("Welcome template {$template->getId()} created by ".$this->currentUser->getUsername());
208 208
     }
209 209
 
210 210
     /**
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
      */
215 215
     public function welcomeTemplateDeleted($templateid)
216 216
     {
217
-        $this->send("Welcome template {$templateid} deleted by " . $this->currentUser->getUsername());
217
+        $this->send("Welcome template {$templateid} deleted by ".$this->currentUser->getUsername());
218 218
     }
219 219
 
220 220
     /**
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
      */
225 225
     public function welcomeTemplateEdited(WelcomeTemplate $template)
226 226
     {
227
-        $this->send("Welcome template {$template->getId()} edited by " . $this->currentUser->getUsername());
227
+        $this->send("Welcome template {$template->getId()} edited by ".$this->currentUser->getUsername());
228 228
     }
229 229
 
230 230
     #endregion
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
             $duration = "indefinitely";
242 242
         }
243 243
         else {
244
-            $duration = "until " . date("F j, Y, g:i a", $ban->getDuration());
244
+            $duration = "until ".date("F j, Y, g:i a", $ban->getDuration());
245 245
         }
246 246
 
247 247
         $username = $this->currentUser->getUsername();
@@ -257,8 +257,8 @@  discard block
 block discarded – undo
257 257
      */
258 258
     public function unbanned(Ban $ban, $unbanreason)
259 259
     {
260
-        $this->send($ban->getTarget() . " unbanned by " . $this->currentUser
261
-                ->getUsername() . " (" . $unbanreason . ")");
260
+        $this->send($ban->getTarget()." unbanned by ".$this->currentUser
261
+                ->getUsername()." (".$unbanreason.")");
262 262
     }
263 263
 
264 264
     #endregion
@@ -273,15 +273,15 @@  discard block
 block discarded – undo
273 273
     public function requestReceived(Request $request)
274 274
     {
275 275
         $this->send(
276
-            IrcColourCode::DARK_GREY . "[["
277
-            . IrcColourCode::DARK_GREEN . "acc:"
278
-            . IrcColourCode::ORANGE . $request->getId()
279
-            . IrcColourCode::DARK_GREY . "]]"
280
-            . IrcColourCode::RED . " N "
281
-            . IrcColourCode::DARK_BLUE . $this->baseUrl . "/internal.php/viewRequest?id={$request->getId()} "
282
-            . IrcColourCode::DARK_RED . "* "
283
-            . IrcColourCode::DARK_GREEN . $request->getName()
284
-            . IrcColourCode::DARK_RED . " * "
276
+            IrcColourCode::DARK_GREY."[["
277
+            . IrcColourCode::DARK_GREEN."acc:"
278
+            . IrcColourCode::ORANGE.$request->getId()
279
+            . IrcColourCode::DARK_GREY."]]"
280
+            . IrcColourCode::RED." N "
281
+            . IrcColourCode::DARK_BLUE.$this->baseUrl."/internal.php/viewRequest?id={$request->getId()} "
282
+            . IrcColourCode::DARK_RED."* "
283
+            . IrcColourCode::DARK_GREEN.$request->getName()
284
+            . IrcColourCode::DARK_RED." * "
285 285
             . IrcColourCode::RESET
286 286
         );
287 287
     }
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
     public function emailCreated(EmailTemplate $template)
443 443
     {
444 444
         $username = $this->currentUser->getUsername();
445
-        $this->send("Email {$template->getId()} ({$template->getName()}) created by " . $username);
445
+        $this->send("Email {$template->getId()} ({$template->getName()}) created by ".$username);
446 446
     }
447 447
 
448 448
     /**
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
     public function emailEdited(EmailTemplate $template)
454 454
     {
455 455
         $username = $this->currentUser->getUsername();
456
-        $this->send("Email {$template->getId()} ({$template->getName()}) edited by " . $username);
456
+        $this->send("Email {$template->getId()} ({$template->getName()}) edited by ".$username);
457 457
     }
458 458
     #endregion
459 459
 }
Please login to merge, or discard this patch.
includes/Security/CredentialProviders/PasswordCredentialProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@
 block discarded – undo
30 30
     public function authenticate(User $user, $data)
31 31
     {
32 32
         $storedData = $this->getCredentialData($user->getId());
33
-        if($storedData === null)
33
+        if ($storedData === null)
34 34
         {
35 35
             // No available credential matching these parameters
36 36
             return false;
37 37
         }
38 38
 
39
-        if($storedData->getVersion() !== 2) {
39
+        if ($storedData->getVersion() !== 2) {
40 40
             // Non-2 versions are not supported.
41 41
             return false;
42 42
         }
Please login to merge, or discard this patch.
config.inc.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 $curlDisableSSLVerifyPeer = false;
242 242
 
243 243
 // Change this to be outside the web directory.
244
-$curlCookieJar = __DIR__ . '/../cookies.txt';
244
+$curlCookieJar = __DIR__.'/../cookies.txt';
245 245
 
246 246
 $yubicoApiId = 0;
247 247
 $yubicoApiKey = "";
@@ -260,19 +260,19 @@  discard block
 block discarded – undo
260 260
 
261 261
 $cDatabaseConfig = array(
262 262
     "acc"           => array(
263
-        "dsrcname" => "mysql:host=" . $toolserver_host . ";dbname=" . $toolserver_database,
263
+        "dsrcname" => "mysql:host=".$toolserver_host.";dbname=".$toolserver_database,
264 264
         "username" => $toolserver_username,
265 265
         "password" => $toolserver_password,
266 266
 		"options"  => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4'),
267 267
     ),
268 268
     "wikipedia"     => array(
269
-        "dsrcname" => "mysql:host=" . $antispoof_host . ";dbname=" . $antispoof_db,
269
+        "dsrcname" => "mysql:host=".$antispoof_host.";dbname=".$antispoof_db,
270 270
         "username" => $toolserver_username,
271 271
         "password" => $toolserver_password,
272 272
         "options"  => array(),
273 273
     ),
274 274
     "notifications" => array(
275
-        "dsrcname" => "mysql:host=" . $toolserver_notification_dbhost . ";dbname=" . $toolserver_notification_database,
275
+        "dsrcname" => "mysql:host=".$toolserver_notification_dbhost.";dbname=".$toolserver_notification_database,
276 276
         "username" => $notifications_username,
277 277
         "password" => $notifications_password,
278 278
         "options"  => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4'),
@@ -303,13 +303,13 @@  discard block
 block discarded – undo
303 303
 }
304 304
 
305 305
 // Set up the AutoLoader
306
-require_once(__DIR__ . "/includes/AutoLoader.php");
306
+require_once(__DIR__."/includes/AutoLoader.php");
307 307
 spl_autoload_register('Waca\\AutoLoader::load');
308
-require_once(__DIR__ . '/vendor/autoload.php');
308
+require_once(__DIR__.'/vendor/autoload.php');
309 309
 
310 310
 // Extra includes which are just plain awkward wherever they are.
311
-require_once(__DIR__ . '/lib/mediawiki-extensions-OAuth/lib/OAuth.php');
312
-require_once(__DIR__ . '/lib/mediawiki-extensions-OAuth/lib/JWT.php');
311
+require_once(__DIR__.'/lib/mediawiki-extensions-OAuth/lib/OAuth.php');
312
+require_once(__DIR__.'/lib/mediawiki-extensions-OAuth/lib/JWT.php');
313 313
 
314 314
 // Crap that's needed for libraries. >:(
315 315
 /**
Please login to merge, or discard this patch.
includes/Pages/PageMain.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         /** @var Request[] $results */
107 107
         $results = $search->getRecordCount($requestCount)->fetch();
108 108
 
109
-        if($requestCount > 0) {
109
+        if ($requestCount > 0) {
110 110
             $requestSectionData['Hospital - Requests failed auto-creation'] = array(
111 111
                 'requests' => $this->prepareRequestData($results),
112 112
                 'total'    => $requestCount,
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         /** @var Request[] $results */
141 141
         $results = $search->getRecordCount($requestCount)->fetch();
142 142
 
143
-        if($requestCount > 0) {
143
+        if ($requestCount > 0) {
144 144
             $requestSectionData['Requests queued in the Job Queue'] = array(
145 145
                 'requests' => $this->prepareRequestData($results),
146 146
                 'total'    => $requestCount,
Please login to merge, or discard this patch.
includes/IdentificationVerifier.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         $onWikiName = $strings->upperCaseFirst($onWikiName);
184 184
 
185 185
         $parameters = self::$apiQueryParameters;
186
-        $parameters['pltitles'] = "User:" . $onWikiName;
186
+        $parameters['pltitles'] = "User:".$onWikiName;
187 187
         $parameters['titles'] = $this->siteConfiguration->getIdentificationNoticeboardPage();
188 188
 
189 189
         try {
@@ -200,6 +200,6 @@  discard block
 block discarded – undo
200 200
 
201 201
         $page = @array_pop($response['query']['pages']);
202 202
 
203
-        return @$page['links'][0]['title'] === "User:" . $onWikiName;
203
+        return @$page['links'][0]['title'] === "User:".$onWikiName;
204 204
     }
205 205
 }
Please login to merge, or discard this patch.
includes/Exceptions/NotIdentifiedException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
         $currentUser = User::getCurrent($database);
49 49
         $this->assign('currentUser', $currentUser);
50 50
 
51
-        if($this->securityManager !== null) {
51
+        if ($this->securityManager !== null) {
52 52
             $this->setupNavMenuAccess($currentUser);
53 53
         }
54 54
 
Please login to merge, or discard this patch.
includes/Helpers/SearchHelpers/SearchHelperBase.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
     {
85 85
         $this->whereClause .= $whereClauseSection;
86 86
 
87
-        $countQuery = 'SELECT /* SearchHelper */ COUNT(*) FROM ' . $this->table . ' origin ';
88
-        $countQuery .= $this->joinClause . $this->whereClause;
87
+        $countQuery = 'SELECT /* SearchHelper */ COUNT(*) FROM '.$this->table.' origin ';
88
+        $countQuery .= $this->joinClause.$this->whereClause;
89 89
 
90 90
         $query = $this->buildQuery(array('*'));
91 91
         $query .= $this->applyOrder();
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                 throw new ApplicationLogicException('Cannot apply distinct to column fetch already using group by');
148 148
             }
149 149
 
150
-            $this->groupByClause = ' GROUP BY origin.' . $column;
150
+            $this->groupByClause = ' GROUP BY origin.'.$column;
151 151
         }
152 152
 
153 153
         $statement = $this->getData(array($column));
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
      */
177 177
     public function getRecordCount(&$count)
178 178
     {
179
-        $query = 'SELECT /* SearchHelper */ COUNT(*) FROM ' . $this->table . ' origin ';
180
-        $query .= $this->joinClause . $this->whereClause;
179
+        $query = 'SELECT /* SearchHelper */ COUNT(*) FROM '.$this->table.' origin ';
180
+        $query .= $this->joinClause.$this->whereClause;
181 181
 
182 182
         $statement = $this->database->prepare($query);
183 183
         $statement->execute($this->parameterList);
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
     private function applyOrder()
225 225
     {
226 226
         if ($this->orderBy !== null) {
227
-            return ' ORDER BY ' . $this->orderBy;
227
+            return ' ORDER BY '.$this->orderBy;
228 228
         }
229 229
 
230 230
         return '';
@@ -257,11 +257,11 @@  discard block
 block discarded – undo
257 257
     {
258 258
         $colData = array();
259 259
         foreach ($columns as $c) {
260
-            $colData[] = 'origin.' . $c;
260
+            $colData[] = 'origin.'.$c;
261 261
         }
262 262
 
263
-        $query = "SELECT {$this->modifiersClause} /* SearchHelper */ " . implode(', ', $colData) . ' FROM ' . $this->table . ' origin ';
264
-        $query .= $this->joinClause . $this->whereClause . $this->groupByClause;
263
+        $query = "SELECT {$this->modifiersClause} /* SearchHelper */ ".implode(', ', $colData).' FROM '.$this->table.' origin ';
264
+        $query .= $this->joinClause.$this->whereClause.$this->groupByClause;
265 265
 
266 266
         return $query;
267 267
     }
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
         // You can't use IN() with parameters directly, so let's munge something together.
283 283
         // Let's create a string of question marks, which will do as positional parameters.
284 284
         $valueCount = count($values);
285
-        $inSection = str_repeat('?,', $valueCount - 1) . '?';
285
+        $inSection = str_repeat('?,', $valueCount - 1).'?';
286 286
 
287 287
         $this->whereClause .= " AND {$column} IN ({$inSection})";
288 288
         $this->parameterList = array_merge($this->parameterList, $values);
Please login to merge, or discard this patch.
includes/Exceptions/AccessDeniedException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
         $currentUser = User::getCurrent($database);
49 49
         $this->assign('currentUser', $currentUser);
50 50
 
51
-        if($this->securityManager !== null) {
51
+        if ($this->securityManager !== null) {
52 52
             $this->setupNavMenuAccess($currentUser);
53 53
         }
54 54
 
Please login to merge, or discard this patch.