x Sorry, these patches are not available anymore due to data migration. Please run a fresh inspection.
Passed
Push — bantools ( 1cbaa6...d648f7 )
by Simon
04:04
created
includes/DataObjects/JobQueue.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,8 @@
 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)',
Please login to merge, or discard this patch.
includes/ConsoleTasks/ClearOAuthDataTask.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         $users = UserSearchHelper::get($database)->inIds(
22 22
             $database->query('SELECT user FROM oauthtoken WHERE type = \'access\'')->fetchColumn());
23 23
 
24
-        foreach ($users as $u){
24
+        foreach ($users as $u) {
25 25
             $oauth = new OAuthUserHelper($u, $database, $this->getOAuthProtocolHelper(), $this->getSiteConfiguration());
26 26
             $oauth->detach();
27 27
         }
Please login to merge, or discard this patch.
includes/Pages/UserAuth/MultiFactor/PageMultiFactor.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -229,7 +229,8 @@  discard block
 block discarded – undo
229 229
         $this->deleteCredential($database, $currentUser, $otpCredentialProvider, $factorType);
230 230
     }
231 231
 
232
-    protected function enableU2F() {
232
+    protected function enableU2F()
233
+    {
233 234
         $database = $this->getDatabase();
234 235
         $currentUser = User::getCurrent($database);
235 236
 
@@ -336,7 +337,8 @@  discard block
 block discarded – undo
336 337
         }
337 338
     }
338 339
 
339
-    protected function disableU2F() {
340
+    protected function disableU2F()
341
+    {
340 342
         $database = $this->getDatabase();
341 343
         $currentUser = User::getCurrent($database);
342 344
 
Please login to merge, or discard this patch.
includes/Security/CredentialProviders/CredentialProviderBase.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,8 @@  discard block
 block discarded – undo
93 93
         return $this->configuration;
94 94
     }
95 95
 
96
-    public function deleteCredential(User $user) {
96
+    public function deleteCredential(User $user)
97
+    {
97 98
         // get this factor
98 99
         $statement = $this->database->prepare('SELECT * FROM credential WHERE user = :user AND type = :type');
99 100
         $statement->execute(array(':user' => $user->getId(), ':type' => $this->type));
@@ -143,7 +144,8 @@  discard block
 block discarded – undo
143 144
      *
144 145
      * @return bool
145 146
      */
146
-    public function userIsEnrolled($userId) {
147
+    public function userIsEnrolled($userId)
148
+    {
147 149
         $cred = $this->getCredentialData($userId);
148 150
 
149 151
         return $cred !== null;
Please login to merge, or discard this patch.
includes/Security/CredentialProviders/ScratchTokenCredentialProvider.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 
63 63
         $usedToken = null;
64 64
         foreach ($scratchTokens as $scratchToken) {
65
-            if (password_verify($data, $scratchToken)){
65
+            if (password_verify($data, $scratchToken)) {
66 66
                 $usedToken = $scratchToken;
67 67
                 SessionAlert::quick("Hey, it looks like you used a scratch token to log in. Would you like to change your multi-factor authentication configuration?", 'alert-warning');
68 68
                 WebRequest::setPostLoginRedirect($this->getConfiguration()->getBaseUrl() . "/internal.php/multiFactor");
Please login to merge, or discard this patch.
includes/Pages/PageLog.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,8 @@
 block discarded – undo
44 44
             $userObj = User::getByUsername($filterUser, $database);
45 45
             if ($userObj !== false) {
46 46
                 $logSearch->byUser($userObj->getId());
47
-            } else {
47
+            }
48
+            else {
48 49
                 $logSearch->byUser(-1);
49 50
             }
50 51
         }
Please login to merge, or discard this patch.
includes/Tasks/JsonApiPageBase.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,8 @@
 block discarded – undo
72 72
         if ($targetVar !== null && preg_match('/^[a-z]+$/', $targetVar)) {
73 73
             $data = $targetVar . ' = ' . $data . ';';
74 74
             header("Content-Type: text/javascript");
75
-        } else {
75
+        }
76
+        else {
76 77
             header("Content-Type: application/json");
77 78
         }
78 79
 
Please login to merge, or discard this patch.
includes/Tasks/PageBase.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -307,8 +307,9 @@
 block discarded – undo
307 307
      *
308 308
      * @param string $path The path (relative to the application root) of the file
309 309
      */
310
-    final protected function addJs($path){
311
-        if(in_array($path, $this->extraJs)){
310
+    final protected function addJs($path)
311
+    {
312
+        if(in_array($path, $this->extraJs)) {
312 313
             // nothing to do
313 314
             return;
314 315
         }
Please login to merge, or discard this patch.
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.