Passed
Push — dependabot/composer/fortawesom... ( b43113 )
by
unknown
05:17
created
includes/Security/CredentialProviders/PasswordCredentialProvider.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
includes/IdentificationVerifier.php 1 patch
Braces   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -77,14 +77,12 @@  discard block
 block discarded – undo
77 77
     {
78 78
         if ($this->checkIdentificationCache($onWikiName)) {
79 79
             return true;
80
-        }
81
-        else {
80
+        } else {
82 81
             if ($this->isIdentifiedOnWiki($onWikiName)) {
83 82
                 $this->cacheIdentificationStatus($onWikiName);
84 83
 
85 84
                 return true;
86
-            }
87
-            else {
85
+            } else {
88 86
                 return false;
89 87
             }
90 88
         }
@@ -190,7 +188,8 @@  discard block
 block discarded – undo
190 188
             $endpoint = $this->siteConfiguration->getMetaWikimediaWebServiceEndpoint();
191 189
             $response = $this->httpHelper->get($endpoint, $parameters);
192 190
             $response = json_decode($response, true);
193
-        } catch (CurlException $ex) {
191
+        }
192
+        catch (CurlException $ex) {
194 193
             // failed getting identification status, so throw a nicer error.
195 194
             $message = 'Could not contact metawiki API to determine user\' identification status. '
196 195
                 . 'This is probably a transient error, so please try again.';
Please login to merge, or discard this patch.
includes/DataObjects/OAuthIdentity.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -90,12 +90,10 @@
 block discarded – undo
90 90
 
91 91
             if ($statement->execute()) {
92 92
                 $this->id = (int)$this->dbObject->lastInsertId();
93
-            }
94
-            else {
93
+            } else {
95 94
                 throw new Exception($statement->errorInfo());
96 95
             }
97
-        }
98
-        else {
96
+        } else {
99 97
             $statement = $this->dbObject->prepare(<<<SQL
100 98
                 UPDATE oauthidentity SET
101 99
                       iss                     = :iss
Please login to merge, or discard this patch.
includes/DataObjects/Credential.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -130,8 +130,7 @@  discard block
 block discarded – undo
130 130
     {
131 131
         if ($timeout === null) {
132 132
             $this->timeout = null;
133
-        }
134
-        else {
133
+        } else {
135 134
             $this->timeout = $timeout->format('Y-m-d H:i:s');
136 135
         }
137 136
     }
@@ -188,12 +187,10 @@  discard block
 block discarded – undo
188 187
 
189 188
             if ($statement->execute()) {
190 189
                 $this->id = (int)$this->dbObject->lastInsertId();
191
-            }
192
-            else {
190
+            } else {
193 191
                 throw new Exception($statement->errorInfo());
194 192
             }
195
-        }
196
-        else {
193
+        } else {
197 194
             // update
198 195
             $statement = $this->dbObject->prepare(<<<SQL
199 196
                 UPDATE credential
Please login to merge, or discard this patch.
includes/DataObjects/JobQueue.php 1 patch
Braces   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,7 +58,8 @@  discard block
 block discarded – undo
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)',
@@ -90,12 +91,10 @@  discard block
 block discarded – undo
90 91
 
91 92
             if ($statement->execute()) {
92 93
                 $this->id = (int)$this->dbObject->lastInsertId();
93
-            }
94
-            else {
94
+            } else {
95 95
                 throw new Exception($statement->errorInfo());
96 96
             }
97
-        }
98
-        else {
97
+        } else {
99 98
             // update
100 99
             $statement = $this->dbObject->prepare(<<<SQL
101 100
                 UPDATE jobqueue SET 
Please login to merge, or discard this patch.
includes/DataObjects/OAuthToken.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,12 +42,10 @@
 block discarded – undo
42 42
 
43 43
             if ($statement->execute()) {
44 44
                 $this->id = (int)$this->dbObject->lastInsertId();
45
-            }
46
-            else {
45
+            } else {
47 46
                 throw new Exception($statement->errorInfo());
48 47
             }
49
-        }
50
-        else {
48
+        } else {
51 49
             // update
52 50
             $statement = $this->dbObject->prepare(<<<SQL
53 51
                 UPDATE oauthtoken
Please login to merge, or discard this patch.
includes/DataObjects/User.php 1 patch
Braces   +8 added lines, -13 removed lines patch added patch discarded remove patch
@@ -64,12 +64,10 @@  discard block
 block discarded – undo
64 64
 
65 65
                 if ($user === false) {
66 66
                     self::$currentUser = new CommunityUser();
67
-                }
68
-                else {
67
+                } else {
69 68
                     self::$currentUser = $user;
70 69
                 }
71
-            }
72
-            else {
70
+            } else {
73 71
                 $anonymousCoward = new CommunityUser();
74 72
 
75 73
                 self::$currentUser = $anonymousCoward;
@@ -203,12 +201,10 @@  discard block
 block discarded – undo
203 201
 
204 202
             if ($statement->execute()) {
205 203
                 $this->id = (int)$this->dbObject->lastInsertId();
206
-            }
207
-            else {
204
+            } else {
208 205
                 throw new Exception($statement->errorInfo());
209 206
             }
210
-        }
211
-        else {
207
+        } else {
212 208
             // update
213 209
             $statement = $this->dbObject->prepare(<<<SQL
214 210
 				UPDATE `user` SET 
@@ -533,12 +529,10 @@  discard block
 block discarded – undo
533 529
         if ($this->forceidentified === 0 || $this->forceidentified === "0") {
534 530
             // User forced to unidentified in the database.
535 531
             return false;
536
-        }
537
-        elseif ($this->forceidentified === 1 || $this->forceidentified === "1") {
532
+        } elseif ($this->forceidentified === 1 || $this->forceidentified === "1") {
538 533
             // User forced to identified in the database.
539 534
             return true;
540
-        }
541
-        else {
535
+        } else {
542 536
             // User not forced to any particular identified status; consult IdentificationVerifier
543 537
             return $iv->isUserIdentified($this->getOnWikiName());
544 538
         }
@@ -549,7 +543,8 @@  discard block
 block discarded – undo
549 543
      *
550 544
      * @return bool|null
551 545
      */
552
-    public function getForceIdentified() {
546
+    public function getForceIdentified()
547
+    {
553 548
         return $this->forceidentified;
554 549
     }
555 550
 
Please login to merge, or discard this patch.
includes/DataObjects/Ban.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@  discard block
 block discarded – undo
46 46
 SQL;
47 47
             $statement = $database->prepare($query);
48 48
             $statement->bindValue(":target", $target);
49
-        }
50
-        else {
49
+        } else {
51 50
             $query = <<<SQL
52 51
 SELECT * FROM ban 
53 52
 WHERE (duration > UNIX_TIMESTAMP() OR duration is null) 
@@ -152,12 +151,10 @@  discard block
 block discarded – undo
152 151
 
153 152
             if ($statement->execute()) {
154 153
                 $this->id = (int)$this->dbObject->lastInsertId();
155
-            }
156
-            else {
154
+            } else {
157 155
                 throw new Exception($statement->errorInfo());
158 156
             }
159
-        }
160
-        else {
157
+        } else {
161 158
             // update
162 159
             $statement = $this->dbObject->prepare(<<<SQL
163 160
 UPDATE `ban`
Please login to merge, or discard this patch.
includes/Background/Task/WelcomeUserTask.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.