Passed
Push — master ( e5b31a...cf340d )
by Arthur
04:48
created
config/cors.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@
 block discarded – undo
13 13
     */
14 14
 
15 15
     'supportsCredentials'    => false,
16
-    'allowedOrigins'         => ['*'],
17
-    'allowedOriginsPatterns' => [],
18
-    'allowedHeaders'         => ['*'],
19
-    'allowedMethods'         => ['*'],
20
-    'exposedHeaders'         => [],
16
+    'allowedOrigins'         => [ '*' ],
17
+    'allowedOriginsPatterns' => [ ],
18
+    'allowedHeaders'         => [ '*' ],
19
+    'allowedMethods'         => [ '*' ],
20
+    'exposedHeaders'         => [ ],
21 21
     'maxAge'                 => 0,
22 22
 
23 23
 ];
Please login to merge, or discard this patch.
src/Foundation/Support/cloudflare_helper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
4
-    $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
3
+if (isset($_SERVER[ 'HTTP_CF_CONNECTING_IP' ])) {
4
+    $_SERVER[ 'REMOTE_ADDR' ] = $_SERVER[ 'HTTP_CF_CONNECTING_IP' ];
5 5
 }
Please login to merge, or discard this patch.
src/Foundation/Kernels/HttpKernel.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@
 block discarded – undo
30 30
     protected $middlewareGroups = [
31 31
         'web' => [
32 32
             \Foundation\Middleware\EncryptCookies::class,
33
-             \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
34
-             \Illuminate\Session\Middleware\StartSession::class,
35
-             \Illuminate\View\Middleware\ShareErrorsFromSession::class,
36
-             \Foundation\Middleware\VerifyCsrfToken::class,
33
+                \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
34
+                \Illuminate\Session\Middleware\StartSession::class,
35
+                \Illuminate\View\Middleware\ShareErrorsFromSession::class,
36
+                \Foundation\Middleware\VerifyCsrfToken::class,
37 37
             \Illuminate\Routing\Middleware\SubstituteBindings::class,
38 38
         ],
39 39
 
Please login to merge, or discard this patch.
config/horizon.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         'production' => [
75 75
             'supervisor-1' => [
76 76
                 'connection' => 'redis',
77
-                'queue'      => ['default'],
77
+                'queue'      => [ 'default' ],
78 78
                 'balance'    => 'simple',
79 79
                 'processes'  => 10,
80 80
                 'tries'      => 3,
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         'local' => [
85 85
             'supervisor-1' => [
86 86
                 'connection' => 'redis',
87
-                'queue'      => ['default'],
87
+                'queue'      => [ 'default' ],
88 88
                 'balance'    => 'simple',
89 89
                 'processes'  => 3,
90 90
                 'tries'      => 3,
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
         'provider' => 'database',
8 8
         'identity_id' => (new \MongoDB\BSON\ObjectId())->__toString(),
Please login to merge, or discard this patch.
src/Modules/Auth0/Abstracts/Auth0ProfileValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 
25 25
     private function validateRequiredAttributes(\stdClass $profile)
26 26
     {
27
-        return array_keys_exists($this->requiredAttributes, (array)$profile);
27
+        return array_keys_exists($this->requiredAttributes, (array) $profile);
28 28
     }
29 29
 
30 30
 }
Please login to merge, or discard this patch.
src/Modules/Auth0/Drivers/Auth0UserProfileStorageDriver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         $profile = $this->transformer->transformProfile($this->profile);
116 116
 
117 117
         if ($this->profileHasChanged()) {
118
-            $profile['provider'] = $this->identityProvider;
118
+            $profile[ 'provider' ] = $this->identityProvider;
119 119
             $this->user->fill($profile);
120 120
             $this->user->save();
121 121
         }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     protected function profileHasChanged(): bool
127 127
     {
128 128
         $user = $this->user->toArray();
129
-        $profile = (array)$this->profile;
129
+        $profile = (array) $this->profile;
130 130
 
131 131
         return !array_is_subset_of($profile, $user);
132 132
     }
Please login to merge, or discard this patch.
src/Modules/Auth0/Services/Auth0Service.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     public function getUserByUserInfo($userInfo)
45 45
     {
46
-        return $this->upsertUser($userInfo['profile']);
46
+        return $this->upsertUser($userInfo[ 'profile' ]);
47 47
     }
48 48
 
49 49
     protected function upsertUser($profile)
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
             throw new BadRequestHttpException('Missing token information: Auth0 user id is not set');
53 53
         }
54 54
         $identifier = explode('|', $profile->user_id);
55
-        $identityProvider = $identifier[0];
56
-        $id = $identifier[1];
55
+        $identityProvider = $identifier[ 0 ];
56
+        $id = $identifier[ 1 ];
57 57
 
58 58
         $user = $this->service->find($id);
59 59
 
Please login to merge, or discard this patch.
src/Modules/Auth0/Http/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->auth0Service->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.