Passed
Push — master ( 7af546...dfd36b )
by Arthur
04:54 queued 15s
created
src/Foundation/Console/SeedCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
         $this->resolver->setDefaultConnection($this->getDatabase());
36 36
 
37
-        Model::unguarded(function () {
37
+        Model::unguarded(function() {
38 38
             foreach ($this->getSeeders() as $seeder) {
39 39
                 $seeder = $this->laravel->make($seeder);
40 40
                 $seeder->__invoke();
@@ -48,6 +48,6 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $this->service = $this->laravel->make(BootstrapRegistrarService::class);
50 50
 
51
-        return $this->service->getSeeders() ?? [];
51
+        return $this->service->getSeeders() ?? [ ];
52 52
     }
53 53
 }
Please login to merge, or discard this patch.
src/Modules/User/Database/factories/UserFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 use Modules\User\Entities\User;
4 4
 
5
-$factory->define(User::class, function (Faker\Generator $faker) {
5
+$factory->define(User::class, function(Faker\Generator $faker) {
6 6
     return [
7 7
         'auth0_id'  => null,
8 8
         'name'      => $faker->name,
Please login to merge, or discard this patch.
src/Modules/User/Entities/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,6 +14,6 @@
 block discarded – undo
14 14
 
15 15
     protected $collection = 'users';
16 16
 
17
-    protected $guarded = [];
17
+    protected $guarded = [ ];
18 18
 
19 19
 }
Please login to merge, or discard this patch.
config/laravel-auth0.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     |   This is used to verify the decoded tokens when using RS256
60 60
     |
61 61
     */
62
-    'authorized_issuers' => [env('AUTH0_DOMAIN')],
62
+    'authorized_issuers' => [ env('AUTH0_DOMAIN') ],
63 63
 
64 64
     /*
65 65
     |--------------------------------------------------------------------------
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     |   Token decoding algorithms supported by your API
86 86
     |
87 87
     */
88
-    'supported_algs' => ['RS256'],
88
+    'supported_algs' => [ 'RS256' ],
89 89
 
90 90
     /*
91 91
     |--------------------------------------------------------------------------
Please login to merge, or discard this patch.
src/Foundation/Repositories/Auth0UserRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
     public function getUserByUserInfo($userInfo)
44 44
     {
45
-        return $this->upsertUser($userInfo['profile']);
45
+        return $this->upsertUser($userInfo[ 'profile' ]);
46 46
     }
47 47
 
48 48
     protected function upsertUser($profile)
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
             throw new Exception('Missing token information: Auth0 user id is not set');
52 52
         }
53 53
         $identifier = explode('|', $profile->user_id);
54
-        $identityProvider = $identifier[0];
55
-        $id = $identifier[1];
54
+        $identityProvider = $identifier[ 0 ];
55
+        $id = $identifier[ 1 ];
56 56
 
57 57
         $user = $this->service->find($id);
58 58
 
Please login to merge, or discard this patch.
src/Modules/User/Services/UserService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 {
17 17
     public function find($id): ?User
18 18
     {
19
-        return Cache::remember($this->getCacheName($id), $this->getCacheTime(), function () use ($id) {
19
+        return Cache::remember($this->getCacheName($id), $this->getCacheTime(), function() use ($id) {
20 20
             return User::find($id);
21 21
         });
22 22
     }
Please login to merge, or discard this patch.
src/Foundation/Tests/BootstrappingTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 {
16 16
     protected $service;
17 17
 
18
-    public function __construct(?string $name = null, array $data = [], string $dataName = '')
18
+    public function __construct(?string $name = null, array $data = [ ], string $dataName = '')
19 19
     {
20 20
         parent::__construct($name, $data, $dataName);
21 21
         $this->service = new BootstrapRegistrarService();
Please login to merge, or discard this patch.
src/Foundation/Middleware/Auth0AuthenticationMiddleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@
 block discarded – undo
38 38
             $user = $this->auth0Repository->getUserByDecodedJWT($tokenInfo);
39 39
 
40 40
             if (!$user) {
41
-                return response()->json(['error' => 'Unauthorized user.'], 401);
41
+                return response()->json([ 'error' => 'Unauthorized user.' ], 401);
42 42
             }
43 43
 
44 44
             \Auth::login($user);
45 45
         } catch (InvalidTokenException $e) {
46
-            return response()->json(['error' => 'Invalid or no token set.'], 401);
46
+            return response()->json([ 'error' => 'Invalid or no token set.' ], 401);
47 47
         } catch (CoreException $e) {
48
-            return response()->json(['error' => $e->getMessage()], 401);
48
+            return response()->json([ 'error' => $e->getMessage() ], 401);
49 49
         }
50 50
 
51 51
         return $next($request);
Please login to merge, or discard this patch.
src/Foundation/Services/BootstrapRegistrarService.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
 
66 66
     private function buildEmptyBootstrapArray()
67 67
     {
68
-        $bootstrapArray = [];
68
+        $bootstrapArray = [ ];
69 69
         foreach ($this->moduleEntityDirectories as $key => $directory) {
70
-            $bootstrapArray[$key] = [];
70
+            $bootstrapArray[ $key ] = [ ];
71 71
         }
72 72
 
73 73
         return $bootstrapArray;
@@ -92,26 +92,26 @@  discard block
 block discarded – undo
92 92
                                     try {
93 93
                                         $command = new $class();
94 94
                                         if ($command instanceof Command) {
95
-                                            $bootstrap[$key][] = $class;
95
+                                            $bootstrap[ $key ][ ] = $class;
96 96
                                         }
97 97
                                     } catch (\Exception $e) {
98 98
                                         break;
99 99
                                     }
100 100
                                     break;
101 101
                                 case 'routes':
102
-                                    $bootstrap[$key][] = $this->buildRouteArray($directoryPath.'/'.$fileName, $namespace);
102
+                                    $bootstrap[ $key ][ ] = $this->buildRouteArray($directoryPath.'/'.$fileName, $namespace);
103 103
                                     break;
104 104
                                 case 'configs':
105
-                                    $bootstrap[$key][] = $this->buildConfigArray($directoryPath.'/'.$fileName, $module->getName());
105
+                                    $bootstrap[ $key ][ ] = $this->buildConfigArray($directoryPath.'/'.$fileName, $module->getName());
106 106
                                     break;
107 107
                                 case 'factories':
108
-                                    $bootstrap[$key][] = $this->buildDirectoryPathArray($directoryPath);
108
+                                    $bootstrap[ $key ][ ] = $this->buildDirectoryPathArray($directoryPath);
109 109
                                     break;
110 110
                                 case 'migrations':
111
-                                    $bootstrap[$key][] = $this->buildDirectoryPathArray($directoryPath);
111
+                                    $bootstrap[ $key ][ ] = $this->buildDirectoryPathArray($directoryPath);
112 112
                                     break;
113 113
                                 case 'seeders':
114
-                                    $bootstrap[$key][] = $class;
114
+                                    $bootstrap[ $key ][ ] = $class;
115 115
                                     break;
116 116
                                 default:
117 117
                                     break;
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
     private function hasPhpExtension(string $fileName): bool
129 129
     {
130
-        return strlen($fileName) > 4 && '.php' === ($fileName[-4].$fileName[-3].$fileName[-2].$fileName[-1]);
130
+        return strlen($fileName) > 4 && '.php' === ($fileName[-4 ].$fileName[-3 ].$fileName[-2 ].$fileName[-1 ]);
131 131
     }
132 132
 
133 133
     public function loadBootstrapFromCache()
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         $apiDomain = str_replace('http://', '', $apiDomain);
150 150
         $apiDomain = str_replace('https://', '', $apiDomain);
151 151
         $moduleNamespace = $namespace;
152
-        $moduleName = explode('\\', $moduleNamespace)[1];
152
+        $moduleName = explode('\\', $moduleNamespace)[ 1 ];
153 153
         $controllerNamespace = $moduleNamespace.'\\'.'Http\\Controllers';
154 154
         $modelNameSpace = $moduleNamespace.'\\'.'Entities\\'.$moduleName;
155 155
 
@@ -180,31 +180,31 @@  discard block
 block discarded – undo
180 180
 
181 181
     public function getCommands(): array
182 182
     {
183
-        return $this->loadBootstrapFromCache()['commands'] ?? [];
183
+        return $this->loadBootstrapFromCache()[ 'commands' ] ?? [ ];
184 184
     }
185 185
 
186 186
     public function getRoutes(): array
187 187
     {
188
-        return $this->loadBootstrapFromCache()['routes'] ?? [];
188
+        return $this->loadBootstrapFromCache()[ 'routes' ] ?? [ ];
189 189
     }
190 190
 
191 191
     public function getConfigs(): array
192 192
     {
193
-        return $this->loadBootstrapFromCache()['configs'] ?? [];
193
+        return $this->loadBootstrapFromCache()[ 'configs' ] ?? [ ];
194 194
     }
195 195
 
196 196
     public function getFactories(): array
197 197
     {
198
-        return $this->loadBootstrapFromCache()['factories'] ?? [];
198
+        return $this->loadBootstrapFromCache()[ 'factories' ] ?? [ ];
199 199
     }
200 200
 
201 201
     public function getMigrations(): array
202 202
     {
203
-        return $this->loadBootstrapFromCache()['migrations'] ?? [];
203
+        return $this->loadBootstrapFromCache()[ 'migrations' ] ?? [ ];
204 204
     }
205 205
 
206 206
     public function getSeeders(): array
207 207
     {
208
-        return $this->loadBootstrapFromCache()['seeders'] ?? [];
208
+        return $this->loadBootstrapFromCache()[ 'seeders' ] ?? [ ];
209 209
     }
210 210
 }
Please login to merge, or discard this patch.