Passed
Push — master ( 759e05...3e6bbe )
by Hergen
12:04
created
src/jwtAuthRoles.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     private static function verifyToken(string $jwt, string $uri, bool $jwk = false): object
101 101
     {
102 102
         $kid = self::getKid($jwt);
103
-        if (! $kid) {
103
+        if (!$kid) {
104 104
             throw authException::auth(422, 'Malformed JWT');
105 105
         }
106 106
         if (config('jwtAuthRoles.cache.enabled')) {
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                 ? self::getJwk($kid, $uri)
117 117
                 : self::getPem($kid, $uri);
118 118
 
119
-        if (! isset($publicKey) || ! $publicKey) {
119
+        if (!isset($publicKey) || !$publicKey) {
120 120
             throw authException::auth(500, 'Unable to validate JWT');
121 121
         }
122 122
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
             if (config('jwtAuthRoles.autoCreateRoles')) {
160 160
                 foreach ($claims->roles as $role) {
161 161
                     $db_role = Role::where('name', $role)->first();
162
-                    if (! $db_role) {
162
+                    if (!$db_role) {
163 163
                         Role::create(['name' => $role, 'guard_name' => 'jwt']);
164 164
                     }
165 165
                 }
Please login to merge, or discard this patch.
src/jwtAuthRolesServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
             ], 'config');
27 27
 
28 28
             $this->publishes([
29
-                __DIR__ . '/../database/migrations/create_jwtauth_tables.php.stub' => $this->getMigrationFileName($filesystem),
29
+                __DIR__.'/../database/migrations/create_jwtauth_tables.php.stub' => $this->getMigrationFileName($filesystem),
30 30
             ], 'migrations');
31 31
         }
32 32
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $this->mergeConfigFrom(__DIR__.'/../config/jwtAuthRoles.php', 'jwtAuthRoles');
42 42
 
43 43
         // Register the service the package provides.
44
-        $this->app->singleton('jwtAuthRoles', function ($app) {
44
+        $this->app->singleton('jwtAuthRoles', function($app) {
45 45
             return new jwtAuthRoles;
46 46
         });
47 47
     }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $timestamp = date('Y_m_d_His');
99 99
 
100 100
         return Collection::make($this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR)
101
-            ->flatMap(function ($path) use ($filesystem) {
101
+            ->flatMap(function($path) use ($filesystem) {
102 102
                 return $filesystem->glob($path.'*_create_jwtauth_tables.php');
103 103
             })->push($this->app->databasePath()."/migrations/{$timestamp}_create_jwtauth_tables.php")
104 104
             ->first();
Please login to merge, or discard this patch.