Failed Conditions
Pull Request — oauthcreation (#531)
by Simon
18:38 queued 08:37
created
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
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
 
61 61
         $usedToken = null;
62 62
         foreach ($scratchTokens as $scratchToken) {
63
-            if (password_verify($data, $scratchToken)){
63
+            if (password_verify($data, $scratchToken)) {
64 64
                 $usedToken = $scratchToken;
65 65
                 break;
66 66
             }
Please login to merge, or discard this patch.
includes/Security/CredentialProviders/PasswordCredentialProvider.php 1 patch
Braces   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
     public function authenticate(User $user, $data)
27 27
     {
28 28
         $storedData = $this->getCredentialData($user->getId());
29
-        if($storedData === null)
30
-        {
29
+        if($storedData === null) {
31 30
             // No available credential matching these parameters
32 31
             return false;
33 32
         }
@@ -38,7 +37,7 @@  discard block
 block discarded – undo
38 37
         }
39 38
 
40 39
         if(password_verify($data, $storedData->getData())) {
41
-            if(password_needs_rehash($storedData->getData(), self::PASSWORD_ALGO, array('cost' => self::PASSWORD_COST))){
40
+            if(password_needs_rehash($storedData->getData(), self::PASSWORD_ALGO, array('cost' => self::PASSWORD_COST))) {
42 41
                 $this->setCredential($user, $storedData->getFactor(), $data);
43 42
             }
44 43
 
@@ -52,7 +51,7 @@  discard block
 block discarded – undo
52 51
     {
53 52
         $storedData = $this->getCredentialData($user->getId());
54 53
 
55
-        if($storedData === null){
54
+        if($storedData === null) {
56 55
             $storedData = $this->createNewCredential($user);
57 56
         }
58 57
 
Please login to merge, or discard this patch.