Passed
Push — master ( 1ba333...d6b6ed )
by meta
07:04 queued 03:57
created
src/Controllers/ApiAuthController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -121,16 +121,16 @@  discard block
 block discarded – undo
121 121
         // Unpack our jwt to verify it is correctly formed
122 122
         $token = $this->unpackJwt($accessToken);
123 123
         // app tokens must be signed in RSA
124
-        if (! isset($token['header']['alg']) || $token['header']['alg'] != 'RS256') {
124
+        if (!isset($token['header']['alg']) || $token['header']['alg'] != 'RS256') {
125 125
             throw new \Exception('Token is not using the correct signing algorithm RS256 '.$accessToken);
126 126
         }
127 127
         // app tokens are RSA signed with a key ID in the header of the token
128
-        if (! isset($token['header']['kid'])) {
128
+        if (!isset($token['header']['kid'])) {
129 129
             throw new \Exception('Token with unknown RSA key id can not be validated '.$accessToken);
130 130
         }
131 131
         // Make sure the key id is known to our azure ad information
132 132
         $kid = $token['header']['kid'];
133
-        if (! isset($this->azureActiveDirectory->signingKeys[$kid])) {
133
+        if (!isset($this->azureActiveDirectory->signingKeys[$kid])) {
134 134
             throw new \Exception('Token signed with unknown KID '.$kid);
135 135
         }
136 136
         // get the x509 encoded cert body
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         $roles = $user->roles()->get()->all();
208 208
         foreach ($roles as $key => $role) {
209 209
             $role->permissions = $role->abilities()->get()->all();
210
-            if (! count($role->permissions)) {
210
+            if (!count($role->permissions)) {
211 211
                 unset($roles[$key]);
212 212
             }
213 213
         }
Please login to merge, or discard this patch.