Passed
Push — oauthcreation-fixes ( 300b79...7bb32b )
by Simon
05:11 queued 02:25
created
includes/Background/CreationTaskBase.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,8 +82,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
includes/Background/BackgroundTaskBase.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
includes/Pages/PageUserManagement.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
includes/Pages/UserAuth/Login/PagePasswordLogin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
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));
Please login to merge, or discard this patch.
includes/Pages/UserAuth/MultiFactor/PageMultiFactor.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
includes/Helpers/OAuthProtocolHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 
91 91
         $apiParams['format'] = 'json';
92 92
 
93
-        if ($apiParams === null || ! is_array($apiParams)) {
93
+        if ($apiParams === null || !is_array($apiParams)) {
94 94
             throw new CurlException("Invalid API call");
95 95
         }
96 96
 
Please login to merge, or discard this patch.
includes/Helpers/BotMediaWikiClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
 
142 142
         $loginResponse = $this->callApi($params, 'POST');
143 143
 
144
-        if($loginResponse->login->result == 'Success'){
144
+        if ($loginResponse->login->result == 'Success') {
145 145
             return;
146 146
         }
147 147
 
Please login to merge, or discard this patch.
includes/Helpers/HttpHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
includes/Helpers/SearchHelpers/RequestSearchHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.