Failed Conditions
Pull Request — oauthcreation (#531)
by Simon
18:38 queued 08:37
created
includes/Security/CredentialProviders/ScratchTokenCredentialProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,13 +60,13 @@
 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
             }
67 67
         }
68 68
 
69
-        if($usedToken === null) {
69
+        if ($usedToken === null) {
70 70
             return false;
71 71
         }
72 72
 
Please login to merge, or discard this patch.
includes/Security/CredentialProviders/PasswordCredentialProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,19 +26,19 @@  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)
29
+        if ($storedData === null)
30 30
         {
31 31
             // No available credential matching these parameters
32 32
             return false;
33 33
         }
34 34
 
35
-        if($storedData->getVersion() !== 2) {
35
+        if ($storedData->getVersion() !== 2) {
36 36
             // Non-2 versions are not supported.
37 37
             return false;
38 38
         }
39 39
 
40
-        if(password_verify($data, $storedData->getData())) {
41
-            if(password_needs_rehash($storedData->getData(), self::PASSWORD_ALGO, array('cost' => self::PASSWORD_COST))){
40
+        if (password_verify($data, $storedData->getData())) {
41
+            if (password_needs_rehash($storedData->getData(), self::PASSWORD_ALGO, array('cost' => self::PASSWORD_COST))) {
42 42
                 $this->setCredential($user, $storedData->getFactor(), $data);
43 43
             }
44 44
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     {
53 53
         $storedData = $this->getCredentialData($user->getId());
54 54
 
55
-        if($storedData === null){
55
+        if ($storedData === null) {
56 56
             $storedData = $this->createNewCredential($user);
57 57
         }
58 58
 
Please login to merge, or discard this patch.