@@ -549,7 +549,8 @@ |
||
549 | 549 | * |
550 | 550 | * @return bool|null |
551 | 551 | */ |
552 | - public function getForceIdentified() { |
|
552 | + public function getForceIdentified() |
|
553 | + { |
|
553 | 554 | return $this->forceidentified; |
554 | 555 | } |
555 | 556 |
@@ -147,7 +147,7 @@ |
||
147 | 147 | $oauth = new OAuthUserHelper($user, $database, $this->getOAuthProtocolHelper(), $this->getSiteConfiguration()); |
148 | 148 | $this->assign('oauth', $oauth); |
149 | 149 | |
150 | - if($user->getForceIdentified() === null) { |
|
150 | + if ($user->getForceIdentified() === null) { |
|
151 | 151 | $idVerifier = new IdentificationVerifier($this->getHttpHelper(), $this->getSiteConfiguration(), $this->getDatabase()); |
152 | 152 | $this->assign('identificationStatus', $idVerifier->isUserIdentified($user->getOnWikiName()) ? 'detected' : 'missing'); |
153 | 153 | } else { |
@@ -150,7 +150,8 @@ |
||
150 | 150 | if($user->getForceIdentified() === null) { |
151 | 151 | $idVerifier = new IdentificationVerifier($this->getHttpHelper(), $this->getSiteConfiguration(), $this->getDatabase()); |
152 | 152 | $this->assign('identificationStatus', $idVerifier->isUserIdentified($user->getOnWikiName()) ? 'detected' : 'missing'); |
153 | - } else { |
|
153 | + } |
|
154 | + else { |
|
154 | 155 | $this->assign('identificationStatus', $user->getForceIdentified() == 1 ? 'forced-on' : 'forced-off'); |
155 | 156 | } |
156 | 157 |
@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | protected function main() |
21 | 21 | { |
22 | - if(WebRequest::wasPosted()) { |
|
22 | + if (WebRequest::wasPosted()) { |
|
23 | 23 | Session::destroy(); |
24 | 24 | $this->redirect("login"); |
25 | 25 | return; |
@@ -193,14 +193,16 @@ |
||
193 | 193 | return $this->partiallyLinked; |
194 | 194 | } |
195 | 195 | |
196 | - public function canCreateAccount() { |
|
196 | + public function canCreateAccount() |
|
197 | + { |
|
197 | 198 | return $this->isFullyLinked() |
198 | 199 | && $this->getIdentity(true)->getGrantBasic() |
199 | 200 | && $this->getIdentity(true)->getGrantHighVolume() |
200 | 201 | && $this->getIdentity(true)->getGrantCreateAccount(); |
201 | 202 | } |
202 | 203 | |
203 | - public function canWelcome() { |
|
204 | + public function canWelcome() |
|
205 | + { |
|
204 | 206 | return $this->isFullyLinked() |
205 | 207 | && $this->getIdentity(true)->getGrantBasic() |
206 | 208 | && $this->getIdentity(true)->getGrantHighVolume() |
@@ -131,7 +131,8 @@ |
||
131 | 131 | $task->setNotificationHelper($this->getNotificationHelper()); |
132 | 132 | } |
133 | 133 | |
134 | - public static function errorHandler($errno, $errstr, $errfile, $errline) { |
|
134 | + public static function errorHandler($errno, $errstr, $errfile, $errline) |
|
135 | + { |
|
135 | 136 | throw new Exception($errfile . "@" . $errline . ": " . $errstr); |
136 | 137 | } |
137 | 138 | } |
@@ -85,7 +85,7 @@ |
||
85 | 85 | // Create a task. |
86 | 86 | $taskName = $job->getTask(); |
87 | 87 | |
88 | - if(!class_exists($taskName)) { |
|
88 | + if (!class_exists($taskName)) { |
|
89 | 89 | throw new ApplicationLogicException('Job task does not exist'); |
90 | 90 | } |
91 | 91 |
@@ -133,7 +133,7 @@ |
||
133 | 133 | if ($reservationId !== 0 && $reservationId !== null) { |
134 | 134 | if ($currentUser->getId() !== $reservationId) { |
135 | 135 | SessionAlert::error("Request is reserved by someone else."); |
136 | - $this->redirect('/viewRequest', null, ['id' => $request->getId()] ); |
|
136 | + $this->redirect('/viewRequest', null, ['id' => $request->getId()]); |
|
137 | 137 | return true; |
138 | 138 | } |
139 | 139 | } |
@@ -30,13 +30,13 @@ |
||
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 | } |
@@ -30,8 +30,7 @@ |
||
30 | 30 | public function authenticate(User $user, $data) |
31 | 31 | { |
32 | 32 | $storedData = $this->getCredentialData($user->getId()); |
33 | - if($storedData === null) |
|
34 | - { |
|
33 | + if($storedData === null) { |
|
35 | 34 | // No available credential matching these parameters |
36 | 35 | return false; |
37 | 36 | } |
@@ -263,7 +263,7 @@ |
||
263 | 263 | "dsrcname" => "mysql:host=" . $toolserver_host . ";dbname=" . $toolserver_database, |
264 | 264 | "username" => $toolserver_username, |
265 | 265 | "password" => $toolserver_password, |
266 | - "options" => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4'), |
|
266 | + "options" => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4'), |
|
267 | 267 | ), |
268 | 268 | "wikipedia" => array( |
269 | 269 | "dsrcname" => "mysql:host=" . $antispoof_host . ";dbname=" . $antispoof_db, |
@@ -106,7 +106,7 @@ discard block |
||
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 |
||
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, |