@@ -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) { |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | } |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | - if($this->job->getParameters() !== null) { |
|
| 188 | + if ($this->job->getParameters() !== null) { |
|
| 189 | 189 | $this->parameters = json_decode($this->job->getParameters()); |
| 190 | 190 | |
| 191 | 191 | if (json_last_error() !== JSON_ERROR_NONE) { |
@@ -194,11 +194,11 @@ discard block |
||
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | // Should we wait for a parent job? |
| 197 | - if($this->job->getParent() !== null) { |
|
| 197 | + if ($this->job->getParent() !== null) { |
|
| 198 | 198 | /** @var JobQueue $parentJob */ |
| 199 | 199 | $parentJob = JobQueue::getById($this->job->getParent(), $this->getDatabase()); |
| 200 | 200 | |
| 201 | - if($parentJob === false) { |
|
| 201 | + if ($parentJob === false) { |
|
| 202 | 202 | $this->markFailed("Parent job could not be found"); |
| 203 | 203 | return; |
| 204 | 204 | } |
@@ -146,7 +146,7 @@ |
||
| 146 | 146 | $oauth = new OAuthUserHelper($user, $database, $this->getOAuthProtocolHelper(), $this->getSiteConfiguration()); |
| 147 | 147 | $this->assign('oauth', $oauth); |
| 148 | 148 | |
| 149 | - if($user->getForceIdentified() === null) { |
|
| 149 | + if ($user->getForceIdentified() === null) { |
|
| 150 | 150 | $idVerifier = new IdentificationVerifier($this->getHttpHelper(), $this->getSiteConfiguration(), $this->getDatabase()); |
| 151 | 151 | $this->assign('identificationStatus', $idVerifier->isUserIdentified($user->getOnWikiName()) ? 'detected' : 'missing'); |
| 152 | 152 | } else { |
@@ -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 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | $userSearchRequest = WebRequest::getString('usersearch'); |
| 41 | 41 | if ($userSearchRequest !== null) { |
| 42 | 42 | $searchedUser = User::getByUsername($userSearchRequest, $database); |
| 43 | - if($searchedUser !== false) { |
|
| 43 | + if ($searchedUser !== false) { |
|
| 44 | 44 | $this->redirect('statistics/users', 'detail', ['user' => $searchedUser->getId()]); |
| 45 | 45 | return; |
| 46 | 46 | } |
@@ -36,13 +36,13 @@ discard block |
||
| 36 | 36 | 'ip' => '172.16.0.164', |
| 37 | 37 | 'routable' => false, |
| 38 | 38 | |
| 39 | - ],[ |
|
| 39 | + ], [ |
|
| 40 | 40 | 'trust' => true, |
| 41 | 41 | 'ip' => '198.51.100.123', |
| 42 | 42 | 'routable' => true, |
| 43 | 43 | 'rdns' => 'trustedproxy.example.com', |
| 44 | 44 | |
| 45 | - ],[ |
|
| 45 | + ], [ |
|
| 46 | 46 | 'trust' => true, |
| 47 | 47 | 'ip' => '192.0.2.1', |
| 48 | 48 | 'routable' => true, |
@@ -63,14 +63,14 @@ discard block |
||
| 63 | 63 | 'ip' => '172.16.0.164', |
| 64 | 64 | 'routable' => false, |
| 65 | 65 | |
| 66 | - ],[ |
|
| 66 | + ], [ |
|
| 67 | 67 | 'trust' => false, |
| 68 | 68 | 'ip' => '198.51.100.234', |
| 69 | 69 | 'routable' => true, |
| 70 | 70 | 'rdns' => 'sketchyproxy.example.com', |
| 71 | 71 | 'showlinks' => true |
| 72 | 72 | |
| 73 | - ],[ |
|
| 73 | + ], [ |
|
| 74 | 74 | 'trust' => false, |
| 75 | 75 | 'ip' => '192.0.2.1', |
| 76 | 76 | 'routable' => true, |
@@ -91,12 +91,12 @@ discard block |
||
| 91 | 91 | 'ip' => '172.16.0.164', |
| 92 | 92 | 'routable' => false, |
| 93 | 93 | |
| 94 | - ],[ |
|
| 94 | + ], [ |
|
| 95 | 95 | 'trust' => true, |
| 96 | 96 | 'ip' => '198.51.100.123', |
| 97 | 97 | 'routable' => true, |
| 98 | 98 | 'rdns' => 'trustedproxy.example.com', |
| 99 | - ],[ |
|
| 99 | + ], [ |
|
| 100 | 100 | 'trust' => false, |
| 101 | 101 | 'ip' => '198.51.100.234', |
| 102 | 102 | 'routable' => true, |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | 'routable' => true, |
| 110 | 110 | 'rdns' => 'trustedproxy2.example.com', |
| 111 | 111 | 'showlinks' => true |
| 112 | - ],[ |
|
| 112 | + ], [ |
|
| 113 | 113 | 'trust' => false, |
| 114 | 114 | 'ip' => '192.0.2.1', |
| 115 | 115 | 'routable' => true, |
@@ -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, |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | { |
| 18 | 18 | list($partialId, $partialStage) = WebRequest::getAuthPartialLogin(); |
| 19 | 19 | |
| 20 | - if($partialId !== null && $partialStage > 1) { |
|
| 20 | + if ($partialId !== null && $partialStage > 1) { |
|
| 21 | 21 | $sql = 'SELECT type FROM credential WHERE user = :user AND factor = :stage AND disabled = 0 ORDER BY priority'; |
| 22 | 22 | $statement = $this->getDatabase()->prepare($sql); |
| 23 | 23 | $statement->execute(array(':user' => $partialId, ':stage' => $partialStage)); |
@@ -153,7 +153,7 @@ |
||
| 153 | 153 | { |
| 154 | 154 | $user = User::getById($id, $database); |
| 155 | 155 | |
| 156 | - if ($user === false || $user->isCommunityUser()) { |
|
| 156 | + if ($user === false || $user->isCommunityUser()) { |
|
| 157 | 157 | throw new ApplicationLogicException("Password reset failed. Please try again."); |
| 158 | 158 | } |
| 159 | 159 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | SessionAlert::success('Enabled YubiKey OTP.'); |
| 82 | 82 | |
| 83 | 83 | $scratchProvider = new ScratchTokenCredentialProvider($database, $this->getSiteConfiguration()); |
| 84 | - if($scratchProvider->getRemaining($currentUser->getId()) < 3) { |
|
| 84 | + if ($scratchProvider->getRemaining($currentUser->getId()) < 3) { |
|
| 85 | 85 | $scratchProvider->setCredential($currentUser, 2, null); |
| 86 | 86 | $tokens = $scratchProvider->getTokens(); |
| 87 | 87 | $this->assign('tokens', $tokens); |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | SessionAlert::success('Enabled TOTP.'); |
| 182 | 182 | |
| 183 | 183 | $scratchProvider = new ScratchTokenCredentialProvider($database, $this->getSiteConfiguration()); |
| 184 | - if($scratchProvider->getRemaining($currentUser->getId()) < 3) { |
|
| 184 | + if ($scratchProvider->getRemaining($currentUser->getId()) < 3) { |
|
| 185 | 185 | $scratchProvider->setCredential($currentUser, 2, null); |
| 186 | 186 | $tokens = $scratchProvider->getTokens(); |
| 187 | 187 | $this->assign('tokens', $tokens); |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | |
| 262 | 262 | list($data, $reqs) = $otpCredentialProvider->getRegistrationData(); |
| 263 | 263 | |
| 264 | - $u2fRequest =json_encode($data); |
|
| 264 | + $u2fRequest = json_encode($data); |
|
| 265 | 265 | $u2fSigns = json_encode($reqs); |
| 266 | 266 | |
| 267 | 267 | $this->addJs('/vendor/yubico/u2flib-server/examples/assets/u2f-api.js'); |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | SessionAlert::success('Enabled U2F.'); |
| 311 | 311 | |
| 312 | 312 | $scratchProvider = new ScratchTokenCredentialProvider($database, $this->getSiteConfiguration()); |
| 313 | - if($scratchProvider->getRemaining($currentUser->getId()) < 3) { |
|
| 313 | + if ($scratchProvider->getRemaining($currentUser->getId()) < 3) { |
|
| 314 | 314 | $scratchProvider->setCredential($currentUser, 2, null); |
| 315 | 315 | $tokens = $scratchProvider->getTokens(); |
| 316 | 316 | $this->assign('tokens', $tokens); |