Completed
Push — master ( 4910fb...c2b8cf )
by John
06:19
created
src/Authenticator/Authenticator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     {
68 68
         $tokenString = $request->headers->get('Authorization');
69 69
 
70
-        if (0 === strpos((string)$tokenString, 'Bearer ')) {
70
+        if (0 === strpos((string) $tokenString, 'Bearer ')) {
71 71
             $tokenString = substr($tokenString, 7);
72 72
         }
73 73
 
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
             if ($claimKey === 'aud') {
136 136
                 if (is_array($claimValue)) {
137 137
                     foreach ($claimValue as $role) {
138
-                        $user->addRole("ROLE_" . strtoupper($role));
138
+                        $user->addRole("ROLE_".strtoupper($role));
139 139
                     }
140 140
                 } elseif (is_string($claimValue)) {
141
-                    $user->addRole("ROLE_" . strtoupper($claimValue));
141
+                    $user->addRole("ROLE_".strtoupper($claimValue));
142 142
                 }
143 143
             }
144 144
         }
Please login to merge, or discard this patch.
tests/unit/Authenticator/JwtKeyTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function validateTokenWillCallVerifySignatureOnToken()
65 65
     {
66
-        $secret = (string)rand();
66
+        $secret = (string) rand();
67 67
         $key    = new JwtKey(['secret' => $secret]);
68 68
         $key->validateToken($this->createTokenMock($secret, $key));
69 69
     }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public function canLoadSecretFromLoader()
84 84
     {
85
-        $secret = (string)rand();
85
+        $secret = (string) rand();
86 86
         $token  = $this->createTokenMock($secret);
87 87
 
88 88
         $loaderMock = $this->getMockBuilder('KleijnWeb\JwtBundle\Authenticator\SecretLoader')->getMock();
Please login to merge, or discard this patch.