@@ -33,7 +33,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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; |
@@ -50,7 +50,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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': |
@@ -239,11 +239,11 @@ |
||
| 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 | |
@@ -26,6 +26,6 @@ |
||
| 26 | 26 | |
| 27 | 27 | protected function getCreationReason(Request $request, User $user) |
| 28 | 28 | { |
| 29 | - return parent::getCreationReason($request, $user) . ', on behalf of [[User:' . $user->getOnWikiName() . ']]'; |
|
| 29 | + return parent::getCreationReason($request, $user).', on behalf of [[User:'.$user->getOnWikiName().']]'; |
|
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 | \ No newline at end of file |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | return; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - if (!$mediaWikiHelper->checkAccountExists($request->getName())){ |
|
| 64 | + if (!$mediaWikiHelper->checkAccountExists($request->getName())) { |
|
| 65 | 65 | $this->markFailed('Account does not exist!'); |
| 66 | 66 | |
| 67 | 67 | return; |
@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | protected abstract function getMediaWikiClient(); |
| 84 | 84 | |
| 85 | - protected function getMediaWikiHelper(){ |
|
| 86 | - if($this->mwHelper === null) { |
|
| 85 | + protected function getMediaWikiHelper() { |
|
| 86 | + if ($this->mwHelper === null) { |
|
| 87 | 87 | $this->mwHelper = new MediaWikiHelper($this->getMediaWikiClient(), $this->getSiteConfiguration()); |
| 88 | 88 | } |
| 89 | 89 | |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | protected function getCreationReason(Request $request, User $user) |
| 94 | 94 | { |
| 95 | - return 'Requested account at [[WP:ACC]], request #' . $request->getId(); |
|
| 95 | + return 'Requested account at [[WP:ACC]], request #'.$request->getId(); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | /** |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | $formParameters['limit'] = $this->limit; |
| 103 | 103 | $this->assign('searchParamsUrl', http_build_query($formParameters, '', '&')); |
| 104 | 104 | |
| 105 | - foreach ($formParameters as $key => $value) { |
|
| 105 | + foreach ($formParameters as $key => $value) { |
|
| 106 | 106 | $this->assign($key, $value); |
| 107 | 107 | } |
| 108 | 108 | } |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | $users = UserSearchHelper::get($database)->inIds( |
| 22 | 22 | $database->query('SELECT user FROM oauthtoken WHERE type = \'access\'')->fetchColumn()); |
| 23 | 23 | |
| 24 | - foreach ($users as $u){ |
|
| 24 | + foreach ($users as $u) { |
|
| 25 | 25 | $oauth = new OAuthUserHelper($u, $database, $this->getOAuthProtocolHelper(), $this->getSiteConfiguration()); |
| 26 | 26 | $oauth->detach(); |
| 27 | 27 | } |