Completed
Push — newinternal-releasecandidate ( 06bb07...1c5b59 )
by Simon
06:04
created
includes/Pages/PageSearch.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     private function getNameSearchResults($searchTerm)
93 93
     {
94
-        $padded = '%' . $searchTerm . '%';
94
+        $padded = '%'.$searchTerm.'%';
95 95
 
96 96
         /** @var Request[] $requests */
97 97
         $requests = RequestSearchHelper::get($this->getDatabase())
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             throw new ApplicationLogicException('The search term "@" is not valid for email address searches!');
117 117
         }
118 118
 
119
-        $padded = '%' . $searchTerm . '%';
119
+        $padded = '%'.$searchTerm.'%';
120 120
 
121 121
         /** @var Request[] $requests */
122 122
         $requests = RequestSearchHelper::get($this->getDatabase())
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
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         $this->assign('currentUser', $currentUser);
58 58
         $this->assign("loggedIn", (!$currentUser->isCommunityUser()));
59 59
 
60
-        if($this->securityManager !== null) {
60
+        if ($this->securityManager !== null) {
61 61
             $this->setupNavMenuAccess($currentUser);
62 62
         }
63 63
 
Please login to merge, or discard this patch.
includes/Helpers/BotMediaWikiClient.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         }
105 105
 
106 106
         if ($data === false) {
107
-            throw new CurlException('Curl error: ' . $this->httpHelper->getError());
107
+            throw new CurlException('Curl error: '.$this->httpHelper->getError());
108 108
         }
109 109
 
110 110
         $result = json_decode($data);
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $response = $this->callApi($tokenParams, 'POST');
125 125
 
126 126
         if (isset($response->error)) {
127
-            throw new MediaWikiApiException($response->error->code . ': ' . $response->error->info);
127
+            throw new MediaWikiApiException($response->error->code.': '.$response->error->info);
128 128
         }
129 129
 
130 130
         $token = $response->query->tokens->logintoken;
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
         $loginResponse = $this->callApi($params, 'POST');
144 144
 
145
-        if($loginResponse->login->result == 'Success'){
145
+        if ($loginResponse->login->result == 'Success') {
146 146
             return;
147 147
         }
148 148
 
Please login to merge, or discard this patch.
includes/Helpers/HttpHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             curl_setopt($this->curlHandle, CURLOPT_SSL_VERIFYPEER, false);
34 34
         }
35 35
 
36
-        if($cookieJar !== null) {
36
+        if ($cookieJar !== null) {
37 37
             curl_setopt($this->curlHandle, CURLOPT_COOKIEFILE, $cookieJar);
38 38
             curl_setopt($this->curlHandle, CURLOPT_COOKIEJAR, $cookieJar);
39 39
         }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     public function get($url, $parameters = null, $headers = array())
60 60
     {
61 61
         if ($parameters !== null && is_array($parameters)) {
62
-            $getString = '?' . http_build_query($parameters);
62
+            $getString = '?'.http_build_query($parameters);
63 63
             $url .= $getString;
64 64
         }
65 65
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
         if ($result === false) {
76 76
             $error = curl_error($this->curlHandle);
77
-            throw new CurlException('Remote request failed with error ' . $error);
77
+            throw new CurlException('Remote request failed with error '.$error);
78 78
         }
79 79
 
80 80
         return $result;
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
         if ($result === false) {
106 106
             $error = curl_error($this->curlHandle);
107
-            throw new CurlException('Remote request failed with error ' . $error);
107
+            throw new CurlException('Remote request failed with error '.$error);
108 108
         }
109 109
 
110 110
         return $result;
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();
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
                 throw new ApplicationLogicException('Cannot apply distinct to column fetch already using group by');
147 147
             }
148 148
 
149
-            $this->groupByClause = ' GROUP BY origin.' . $column;
149
+            $this->groupByClause = ' GROUP BY origin.'.$column;
150 150
         }
151 151
 
152 152
         $statement = $this->getData(array($column));
@@ -175,8 +175,8 @@  discard block
 block discarded – undo
175 175
      */
176 176
     public function getRecordCount(&$count)
177 177
     {
178
-        $query = 'SELECT /* SearchHelper */ COUNT(*) FROM ' . $this->table . ' origin ';
179
-        $query .= $this->joinClause . $this->whereClause;
178
+        $query = 'SELECT /* SearchHelper */ COUNT(*) FROM '.$this->table.' origin ';
179
+        $query .= $this->joinClause.$this->whereClause;
180 180
 
181 181
         $statement = $this->database->prepare($query);
182 182
         $statement->execute($this->parameterList);
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
     private function applyOrder()
224 224
     {
225 225
         if ($this->orderBy !== null) {
226
-            return ' ORDER BY ' . $this->orderBy;
226
+            return ' ORDER BY '.$this->orderBy;
227 227
         }
228 228
 
229 229
         return '';
@@ -255,11 +255,11 @@  discard block
 block discarded – undo
255 255
     {
256 256
         $colData = array();
257 257
         foreach ($columns as $c) {
258
-            $colData[] = 'origin.' . $c;
258
+            $colData[] = 'origin.'.$c;
259 259
         }
260 260
 
261
-        $query = "SELECT {$this->modifiersClause} /* SearchHelper */ " . implode(', ', $colData) . ' FROM ' . $this->table . ' origin ';
262
-        $query .= $this->joinClause . $this->whereClause . $this->groupByClause;
261
+        $query = "SELECT {$this->modifiersClause} /* SearchHelper */ ".implode(', ', $colData).' FROM '.$this->table.' origin ';
262
+        $query .= $this->joinClause.$this->whereClause.$this->groupByClause;
263 263
 
264 264
         return $query;
265 265
     }
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         $valueCount = count($values);
282 282
 
283 283
         // Firstly, let's create a string of question marks, which will do as positional parameters.
284
-        $inSection = str_repeat('?,', $valueCount - 1) . '?';
284
+        $inSection = str_repeat('?,', $valueCount - 1).'?';
285 285
 
286 286
         $this->whereClause .= " AND {$column} IN ({$inSection})";
287 287
         $this->parameterList = array_merge($this->parameterList, $values);
Please login to merge, or discard this patch.
includes/Helpers/SearchHelpers/RequestSearchHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     {
51 51
         $this->whereClause .= ' AND (ip LIKE ? OR forwardedip LIKE ?)';
52 52
         $this->parameterList[] = $ipAddress;
53
-        $this->parameterList[] = '%' . trim($ipAddress, '%') . '%';
53
+        $this->parameterList[] = '%'.trim($ipAddress, '%').'%';
54 54
 
55 55
         return $this;
56 56
     }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     public function isHospitalised()
168 168
     {
169 169
         $this->whereClause .= ' AND status = ?';
170
-        $this->parameterList[] =  RequestStatus::HOSPITAL;
170
+        $this->parameterList[] = RequestStatus::HOSPITAL;
171 171
 
172 172
         return $this;
173 173
     }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     public function notHospitalised()
181 181
     {
182 182
         $this->whereClause .= ' AND status <> ?';
183
-        $this->parameterList[] =  RequestStatus::HOSPITAL;
183
+        $this->parameterList[] = RequestStatus::HOSPITAL;
184 184
 
185 185
         return $this;
186 186
     }
Please login to merge, or discard this patch.
includes/Helpers/LogHelper.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             $template = EmailTemplate::getById((int)$id, $entry->getDatabase());
130 130
 
131 131
             if ($template != false) {
132
-                return "closed (" . $template->getName() . ")";
132
+                return "closed (".$template->getName().")";
133 133
             }
134 134
         }
135 135
 
@@ -275,10 +275,10 @@  discard block
 block discarded – undo
275 275
                 $ban = Ban::getById($objectId, $database);
276 276
 
277 277
                 if ($ban === false) {
278
-                    return 'Ban #' . $objectId . "</a>";
278
+                    return 'Ban #'.$objectId."</a>";
279 279
                 }
280 280
 
281
-                return 'Ban #' . $objectId . " (" . htmlentities($ban->getTarget()) . ")</a>";
281
+                return 'Ban #'.$objectId." (".htmlentities($ban->getTarget()).")</a>";
282 282
             case 'EmailTemplate':
283 283
                 /** @var EmailTemplate $emailTemplate */
284 284
                 $emailTemplate = EmailTemplate::getById($objectId, $database);
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
                 $taskDescriptions = JobQueue::getTaskDescriptions();
324 324
 
325 325
                 $task = $job->getTask();
326
-                if(isset($taskDescriptions[$task])){
326
+                if (isset($taskDescriptions[$task])) {
327 327
                     $description = $taskDescriptions[$task];
328 328
                 } else {
329 329
                     $description = 'Unknown task';
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 
332 332
                 return "<a href=\"{$baseurl}/internal.php/jobQueue/view?id={$objectId}\">Job #{$job->getId()} ({$description})</a>";
333 333
             default:
334
-                return '[' . $objectType . " " . $objectId . ']';
334
+                return '['.$objectType." ".$objectId.']';
335 335
         }
336 336
     }
337 337
 
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
                     $renameData = unserialize($logEntry->getComment());
380 380
                     $oldName = htmlentities($renameData['old'], ENT_COMPAT, 'UTF-8');
381 381
                     $newName = htmlentities($renameData['new'], ENT_COMPAT, 'UTF-8');
382
-                    $comment = 'Renamed \'' . $oldName . '\' to \'' . $newName . '\'.';
382
+                    $comment = 'Renamed \''.$oldName.'\' to \''.$newName.'\'.';
383 383
                     break;
384 384
                 case 'RoleChange':
385 385
                     $roleChangeData = unserialize($logEntry->getComment());
@@ -396,15 +396,15 @@  discard block
 block discarded – undo
396 396
 
397 397
                     $reason = htmlentities($roleChangeData['reason'], ENT_COMPAT, 'UTF-8');
398 398
 
399
-                    $roleDelta = 'Removed [' . implode(', ', $removed) . '], Added [' . implode(', ', $added) . ']';
400
-                    $comment = $roleDelta . ' with comment: ' . $reason;
399
+                    $roleDelta = 'Removed ['.implode(', ', $removed).'], Added ['.implode(', ', $added).']';
400
+                    $comment = $roleDelta.' with comment: '.$reason;
401 401
                     break;
402 402
                 case 'JobIssue':
403 403
                     $jobIssueData = unserialize($logEntry->getComment());
404 404
                     $errorMessage = $jobIssueData['error'];
405 405
                     $status = $jobIssueData['status'];
406 406
 
407
-                    $comment = 'Job ' . htmlentities($status, ENT_COMPAT, 'UTF-8') . ': ';
407
+                    $comment = 'Job '.htmlentities($status, ENT_COMPAT, 'UTF-8').': ';
408 408
                     $comment .= htmlentities($errorMessage, ENT_COMPAT, 'UTF-8');
409 409
                     break;
410 410
                 case 'JobIssueRequest':
Please login to merge, or discard this patch.
includes/Helpers/RequestEmailHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -239,11 +239,11 @@
 block discarded – undo
239 239
 
240 240
         $emailSig = $currentUser->getEmailSig();
241 241
         if ($emailSig !== '' || $emailSig !== null) {
242
-            $emailSig = "\n\n" . $emailSig;
242
+            $emailSig = "\n\n".$emailSig;
243 243
         }
244 244
 
245 245
         $subject = "RE: [ACC #{$request->getId()}] English Wikipedia Account Request";
246
-        $content = $mailText . $emailSig;
246
+        $content = $mailText.$emailSig;
247 247
 
248 248
         $helper->sendMail($request->getEmail(), $subject, $content, $headers);
249 249
 
Please login to merge, or discard this patch.
includes/Helpers/OAuthProtocolHelper.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function getRequestToken()
79 79
     {
80
-        $endpoint = $this->oauthEndpoint . '/initiate&format=json&oauth_callback=oob';
80
+        $endpoint = $this->oauthEndpoint.'/initiate&format=json&oauth_callback=oob';
81 81
 
82 82
         $parsedUrl = parse_url($endpoint);
83 83
         $urlParameters = array();
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
         $data = $this->httpHelper->get($targetUrl, null);
93 93
 
94 94
         if ($data === false) {
95
-            throw new CurlException('Curl error: ' . $this->httpHelper->getError());
95
+            throw new CurlException('Curl error: '.$this->httpHelper->getError());
96 96
         }
97 97
 
98 98
         $token = json_decode($data);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         }
103 103
 
104 104
         if (isset($token->error)) {
105
-            throw new OAuthException('Error encountered while getting request token: ' . $token->error);
105
+            throw new OAuthException('Error encountered while getting request token: '.$token->error);
106 106
         }
107 107
 
108 108
         return $token;
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     public function callbackCompleted($oauthRequestToken, $oauthRequestSecret, $oauthVerifier)
131 131
     {
132
-        $endpoint = $this->oauthEndpoint . '/token&format=json';
132
+        $endpoint = $this->oauthEndpoint.'/token&format=json';
133 133
 
134 134
         $requestConsumer = new OAuthConsumer($oauthRequestToken, $oauthRequestSecret);
135 135
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $data = $this->httpHelper->get($targetUrl, null);
148 148
 
149 149
         if ($data === false) {
150
-            throw new CurlException('Curl error: ' . $this->httpHelper->getError());
150
+            throw new CurlException('Curl error: '.$this->httpHelper->getError());
151 151
         }
152 152
 
153 153
         $token = json_decode($data);
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         }
158 158
 
159 159
         if (isset($token->error)) {
160
-            throw new OAuthException('Error encountered while getting access token: ' . $token->error);
160
+            throw new OAuthException('Error encountered while getting access token: '.$token->error);
161 161
         }
162 162
 
163 163
         return $token;
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      */
174 174
     public function getIdentityTicket($oauthAccessToken, $oauthAccessSecret)
175 175
     {
176
-        $endpoint = $this->oauthEndpoint . '/identify&format=json';
176
+        $endpoint = $this->oauthEndpoint.'/identify&format=json';
177 177
 
178 178
         $oauthToken = new OAuthToken($oauthAccessToken, $oauthAccessSecret);
179 179
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         $data = $this->httpHelper->get($targetUrl, null);
191 191
 
192 192
         if ($data === false) {
193
-            throw new CurlException('Curl error: ' . $this->httpHelper->getError());
193
+            throw new CurlException('Curl error: '.$this->httpHelper->getError());
194 194
         }
195 195
 
196 196
         $decodedData = json_decode($data);
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         }
247 247
 
248 248
         if ($data === false) {
249
-            throw new CurlException('Curl error: ' . $this->httpHelper->getError());
249
+            throw new CurlException('Curl error: '.$this->httpHelper->getError());
250 250
         }
251 251
 
252 252
         return json_decode($data);
Please login to merge, or discard this patch.