@@ -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 | /** |
@@ -177,7 +177,7 @@ discard block |
||
| 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) { |
@@ -188,15 +188,15 @@ discard block |
||
| 188 | 188 | $this->parameters = json_decode($this->job->getParameters()); |
| 189 | 189 | |
| 190 | 190 | if (json_last_error() !== JSON_ERROR_NONE) { |
| 191 | - throw new ApplicationLogicException('JSON decode: ' . json_last_error_msg()); |
|
| 191 | + throw new ApplicationLogicException('JSON decode: '.json_last_error_msg()); |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | // Should we wait for a parent job? |
| 195 | - if($this->job->getParent() !== null) { |
|
| 195 | + if ($this->job->getParent() !== null) { |
|
| 196 | 196 | /** @var JobQueue $parentJob */ |
| 197 | 197 | $parentJob = JobQueue::getById($this->job->getParent(), $this->getDatabase()); |
| 198 | 198 | |
| 199 | - if($parentJob === false) { |
|
| 199 | + if ($parentJob === false) { |
|
| 200 | 200 | $this->markFailed("Parent job could not be found"); |
| 201 | 201 | return; |
| 202 | 202 | } |
@@ -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 | } |
@@ -569,7 +569,7 @@ |
||
| 569 | 569 | public function getForgottenPasswordHash() |
| 570 | 570 | { |
| 571 | 571 | // FIXME |
| 572 | - return md5($this->username . $this->email . $this->welcome_template . $this->id); |
|
| 572 | + return md5($this->username.$this->email.$this->welcome_template.$this->id); |
|
| 573 | 573 | } |
| 574 | 574 | |
| 575 | 575 | /** |
@@ -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 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | // Create a task. |
| 74 | 74 | $taskName = $job->getTask(); |
| 75 | 75 | |
| 76 | - if(!class_exists($taskName)) { |
|
| 76 | + if (!class_exists($taskName)) { |
|
| 77 | 77 | throw new ApplicationLogicException('Job task does not exist'); |
| 78 | 78 | } |
| 79 | 79 | |
@@ -127,6 +127,6 @@ discard block |
||
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | public static function errorHandler($errno, $errstr, $errfile, $errline) { |
| 130 | - throw new Exception($errfile . "@" . $errline . ": " . $errstr); |
|
| 130 | + throw new Exception($errfile."@".$errline.": ".$errstr); |
|
| 131 | 131 | } |
| 132 | 132 | } |
| 133 | 133 | \ No newline at end of file |
@@ -144,7 +144,7 @@ |
||
| 144 | 144 | throw new ApplicationLogicException('Could not find requested job'); |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | - $this->setHtmlTitle('Job #' . $job->getId()); |
|
| 147 | + $this->setHtmlTitle('Job #'.$job->getId()); |
|
| 148 | 148 | |
| 149 | 149 | $this->prepareMaps(); |
| 150 | 150 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | |
| 112 | 112 | $results = $search->getRecordCount($requestCount)->fetch(); |
| 113 | 113 | |
| 114 | - if($requestCount > 0) { |
|
| 114 | + if ($requestCount > 0) { |
|
| 115 | 115 | $requestSectionData['Hospital - Requests failed auto-creation'] = array( |
| 116 | 116 | 'requests' => $results, |
| 117 | 117 | 'total' => $requestCount, |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | |
| 144 | 144 | $results = $search->getRecordCount($requestCount)->fetch(); |
| 145 | 145 | |
| 146 | - if($requestCount > 0) { |
|
| 146 | + if ($requestCount > 0) { |
|
| 147 | 147 | $requestSectionData['Requests queued in the Job Queue'] = array( |
| 148 | 148 | 'requests' => $results, |
| 149 | 149 | 'total' => $requestCount, |