@@ -82,7 +82,8 @@ |
||
| 82 | 82 | */ |
| 83 | 83 | protected abstract function getMediaWikiClient(); |
| 84 | 84 | |
| 85 | - protected function getMediaWikiHelper(){ |
|
| 85 | + protected function getMediaWikiHelper() |
|
| 86 | + { |
|
| 86 | 87 | if($this->mwHelper === null) { |
| 87 | 88 | $this->mwHelper = new MediaWikiHelper($this->getMediaWikiClient(), $this->getSiteConfiguration()); |
| 88 | 89 | } |
@@ -177,7 +177,7 @@ |
||
| 177 | 177 | throw new ApplicationLogicException('Cannot locate request'); |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - if($this->job->getEmailTemplate() !== null){ |
|
| 180 | + if($this->job->getEmailTemplate() !== null) { |
|
| 181 | 181 | $this->emailTemplate = EmailTemplate::getById($this->job->getEmailTemplate(), $this->getDatabase()); |
| 182 | 182 | |
| 183 | 183 | if ($this->emailTemplate === false) { |
@@ -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 | } |
@@ -58,7 +58,8 @@ |
||
| 58 | 58 | /** |
| 59 | 59 | * This feels like the least bad place to put this method. |
| 60 | 60 | */ |
| 61 | - public static function getTaskDescriptions() { |
|
| 61 | + public static function getTaskDescriptions() |
|
| 62 | + { |
|
| 62 | 63 | return array( |
| 63 | 64 | BotCreationTask::class => 'Create account (via bot)', |
| 64 | 65 | UserCreationTask::class => 'Create account (via OAuth)', |
@@ -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 | } |
@@ -126,7 +126,8 @@ |
||
| 126 | 126 | $task->setNotificationHelper($this->getNotificationHelper()); |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | - public static function errorHandler($errno, $errstr, $errfile, $errline) { |
|
| 129 | + public static function errorHandler($errno, $errstr, $errfile, $errline) |
|
| 130 | + { |
|
| 130 | 131 | throw new Exception($errfile . "@" . $errline . ": " . $errstr); |
| 131 | 132 | } |
| 132 | 133 | } |
| 133 | 134 | \ No newline at end of file |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | |
| 228 | 228 | $entryComment = $entry->getComment(); |
| 229 | 229 | |
| 230 | - if($entry->getAction() === 'JobIssueRequest' || $entry->getAction() === 'JobCompletedRequest'){ |
|
| 230 | + if($entry->getAction() === 'JobIssueRequest' || $entry->getAction() === 'JobCompletedRequest') { |
|
| 231 | 231 | $data = unserialize($entry->getComment()); |
| 232 | 232 | /** @var JobQueue $job */ |
| 233 | 233 | $job = JobQueue::getById($data['job'], $database); |
@@ -243,7 +243,8 @@ discard block |
||
| 243 | 243 | 'jobId' => $job->getId(), |
| 244 | 244 | 'jobDesc' => JobQueue::getTaskDescriptions()[$job->getTask()], |
| 245 | 245 | ); |
| 246 | - } else { |
|
| 246 | + } |
|
| 247 | + else { |
|
| 247 | 248 | $requestLogs[] = array( |
| 248 | 249 | 'type' => 'log', |
| 249 | 250 | 'security' => 'user', |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | // this has the side effect of allowing them to keep a selected mode that either has been changed for them, |
| 82 | 82 | // or that they have kept from when they previously had certain access. |
| 83 | 83 | $creationMode = WebRequest::postInt('creationmode'); |
| 84 | - if($this->barrierTest($creationMode, $user, 'RequestCreation')){ |
|
| 84 | + if($this->barrierTest($creationMode, $user, 'RequestCreation')) { |
|
| 85 | 85 | $user->setCreationMode($creationMode); |
| 86 | 86 | } |
| 87 | 87 | } |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | $this->getSiteConfiguration()); |
| 68 | 68 | |
| 69 | 69 | if ($oauth->isFullyLinked()) { |
| 70 | - try{ |
|
| 70 | + try { |
|
| 71 | 71 | // Reload the user's identity ticket. |
| 72 | 72 | $oauth->refreshIdentity(); |
| 73 | 73 | |