Passed
Push — oauthcreation-fixes ( 300b79...7bb32b )
by Simon
05:11 queued 02:25
created
includes/DataObjects/User.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -549,7 +549,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
includes/Pages/Statistics/StatsUsers.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@
 block discarded – undo
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 {
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
includes/Pages/UserAuth/PageLogout.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
includes/Helpers/OAuthUserHelper.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -193,14 +193,16 @@
 block discarded – undo
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()
Please login to merge, or discard this patch.
includes/ConsoleTasks/RunJobQueueTask.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,8 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
includes/Pages/RequestAction/PageCloseRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
includes/Security/CredentialProviders/PasswordCredentialProvider.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@
 block discarded – undo
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
         }
Please login to merge, or discard this 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.
config.inc.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -263,7 +263,7 @@
 block discarded – undo
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,
Please login to merge, or discard this patch.
includes/Pages/PageMain.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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,
Please login to merge, or discard this patch.