@@ -16,7 +16,7 @@ |
||
16 | 16 | { |
17 | 17 | $this->app->register(\Jenssegers\Mongodb\MongodbServiceProvider::class); |
18 | 18 | $this->app->register(\Jenssegers\Mongodb\MongodbQueueServiceProvider::class); |
19 | - DB::connection( 'mongodb' )->enableQueryLog(); |
|
19 | + DB::connection('mongodb')->enableQueryLog(); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 |
@@ -25,11 +25,11 @@ |
||
25 | 25 | { |
26 | 26 | $this->app->register(\Auth0\Login\LoginServiceProvider::class); |
27 | 27 | |
28 | - $this->app->bind(\Auth0\Login\Contract\Auth0UserRepository::class, function () { |
|
28 | + $this->app->bind(\Auth0\Login\Contract\Auth0UserRepository::class, function() { |
|
29 | 29 | return new Auth0Service(new UserService()); |
30 | 30 | }); |
31 | 31 | |
32 | - $this->app->bind(Auth0ServiceContract::class, function () { |
|
32 | + $this->app->bind(Auth0ServiceContract::class, function() { |
|
33 | 33 | return new Auth0Service(new UserService()); |
34 | 34 | }); |
35 | 35 | } |
@@ -59,7 +59,7 @@ discard block |
||
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 |
||
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 | |-------------------------------------------------------------------------- |
@@ -13,11 +13,11 @@ |
||
13 | 13 | */ |
14 | 14 | |
15 | 15 | 'supportsCredentials' => true, |
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 | ]; |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | public function handle() |
37 | 37 | { |
38 | - Artisan::call('vendor:publish',[ |
|
38 | + Artisan::call('vendor:publish', [ |
|
39 | 39 | "--provider"=>"Laravel\Horizon\HorizonServiceProvider" |
40 | 40 | ]); |
41 | 41 | $this->info('Horizon assets published.'); |
@@ -74,7 +74,7 @@ discard block |
||
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 |
||
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, |
@@ -22,22 +22,22 @@ discard block |
||
22 | 22 | |
23 | 23 | //Telescope::night(); |
24 | 24 | |
25 | - Telescope::filter(function (IncomingEntry $entry) { |
|
25 | + Telescope::filter(function(IncomingEntry $entry) { |
|
26 | 26 | if ($entry->type === EntryType::REQUEST |
27 | - && isset($entry->content['uri']) |
|
28 | - && str_contains($entry->content['uri'], 'horizon')) { |
|
27 | + && isset($entry->content[ 'uri' ]) |
|
28 | + && str_contains($entry->content[ 'uri' ], 'horizon')) { |
|
29 | 29 | return false; |
30 | 30 | } |
31 | 31 | |
32 | 32 | if ($entry->type === EntryType::EVENT |
33 | - && isset($entry->content['name']) |
|
34 | - && str_contains($entry->content['name'], 'Horizon')) { |
|
33 | + && isset($entry->content[ 'name' ]) |
|
34 | + && str_contains($entry->content[ 'name' ], 'Horizon')) { |
|
35 | 35 | return false; |
36 | 36 | } |
37 | 37 | |
38 | 38 | if ($entry->type === EntryType::REQUEST |
39 | - && isset($entry->content['method']) |
|
40 | - && $entry->content['method'] ==='OPTIONS'){ |
|
39 | + && isset($entry->content[ 'method' ]) |
|
40 | + && $entry->content[ 'method' ] === 'OPTIONS') { |
|
41 | 41 | return false; |
42 | 42 | } |
43 | 43 | |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | protected function gate() |
65 | 65 | { |
66 | - Gate::define('viewTelescope', function ($user) { |
|
66 | + Gate::define('viewTelescope', function($user) { |
|
67 | 67 | return in_array($user->email, [ |
68 | 68 | // |
69 | 69 | ]); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | public function handle() |
37 | 37 | { |
38 | - Artisan::call('vendor:publish',[ |
|
38 | + Artisan::call('vendor:publish', [ |
|
39 | 39 | "--tag" => "telescope-assets", |
40 | 40 | "--force" => true |
41 | 41 | ]); |
@@ -79,16 +79,16 @@ discard block |
||
79 | 79 | private function loadRoutes() |
80 | 80 | { |
81 | 81 | foreach ($this->bootstrapService->getRoutes() as $route) { |
82 | - $path = $route['path']; |
|
82 | + $path = $route[ 'path' ]; |
|
83 | 83 | Route::group([ |
84 | - 'prefix' => 'v1/' . str_plural($route['module']), |
|
85 | - 'namespace' => $route['controller'], |
|
86 | - 'domain' => $route['domain'], |
|
87 | - 'middleware' => ['api'], |
|
88 | - ], function () use ($path) { |
|
84 | + 'prefix' => 'v1/'.str_plural($route[ 'module' ]), |
|
85 | + 'namespace' => $route[ 'controller' ], |
|
86 | + 'domain' => $route[ 'domain' ], |
|
87 | + 'middleware' => [ 'api' ], |
|
88 | + ], function() use ($path) { |
|
89 | 89 | require $path; |
90 | 90 | }); |
91 | - Route::model($route['module'], $route['model']); |
|
91 | + Route::model($route[ 'module' ], $route[ 'model' ]); |
|
92 | 92 | } |
93 | 93 | } |
94 | 94 | |
@@ -100,11 +100,11 @@ discard block |
||
100 | 100 | protected function loadConfigs() |
101 | 101 | { |
102 | 102 | foreach ($this->bootstrapService->getConfigs() as $config) { |
103 | - if (isset($config['filename']) && is_string($config['filename'])) { |
|
104 | - $fileName = $config['filename']; |
|
105 | - $configName = strtolower(explode('.',$fileName)[0]); |
|
103 | + if (isset($config[ 'filename' ]) && is_string($config[ 'filename' ])) { |
|
104 | + $fileName = $config[ 'filename' ]; |
|
105 | + $configName = strtolower(explode('.', $fileName)[ 0 ]); |
|
106 | 106 | $this->mergeConfigFrom( |
107 | - $config['path'], $configName |
|
107 | + $config[ 'path' ], $configName |
|
108 | 108 | ); |
109 | 109 | } |
110 | 110 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | { |
120 | 120 | foreach ($this->bootstrapService->getFactories() as $factory) { |
121 | 121 | if (!$this->app->environment('production')) { |
122 | - app(Factory::class)->load($factory['path']); |
|
122 | + app(Factory::class)->load($factory[ 'path' ]); |
|
123 | 123 | } |
124 | 124 | } |
125 | 125 | } |
@@ -132,15 +132,15 @@ discard block |
||
132 | 132 | public function loadMigrations() |
133 | 133 | { |
134 | 134 | foreach ($this->bootstrapService->getMigrations() as $migration) { |
135 | - $this->loadMigrationsFrom($migration['path']); |
|
135 | + $this->loadMigrationsFrom($migration[ 'path' ]); |
|
136 | 136 | } |
137 | 137 | } |
138 | 138 | |
139 | 139 | private function loadPolicies() |
140 | 140 | { |
141 | 141 | foreach ($this->bootstrapService->getPolicies() as $policy) { |
142 | - if (class_implements_interface($policy['class'], ModelPolicyContract::class)) { |
|
143 | - Gate::policy($policy['model'], $policy['class']); |
|
142 | + if (class_implements_interface($policy[ 'class' ], ModelPolicyContract::class)) { |
|
143 | + Gate::policy($policy[ 'model' ], $policy[ 'class' ]); |
|
144 | 144 | } |
145 | 145 | } |
146 | 146 | } |
@@ -149,8 +149,8 @@ discard block |
||
149 | 149 | { |
150 | 150 | $app = $this->app; |
151 | 151 | $service = $this->bootstrapService; |
152 | - $this->app->extend('command.seed', function () use ($app, $service) { |
|
153 | - return new SeedCommand($app['db'], $service); |
|
152 | + $this->app->extend('command.seed', function() use ($app, $service) { |
|
153 | + return new SeedCommand($app[ 'db' ], $service); |
|
154 | 154 | }); |
155 | 155 | } |
156 | 156 | |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | foreach ($this->bootstrapService->getModels() as $model) { |
169 | 169 | if (class_implements_interface($model, Ownable::class)) { |
170 | 170 | Gate::policy($model, OwnershipPolicy::class); |
171 | - Gate::define('access', OwnershipPolicy::class . '@access'); |
|
171 | + Gate::define('access', OwnershipPolicy::class.'@access'); |
|
172 | 172 | } |
173 | 173 | } |
174 | 174 | } |
@@ -184,8 +184,8 @@ discard block |
||
184 | 184 | private function loadListeners() |
185 | 185 | { |
186 | 186 | foreach ($this->bootstrapService->getEvents() as $event) { |
187 | - foreach ($event['listeners'] as $listener) { |
|
188 | - Event::listen($event['class'], $listener); |
|
187 | + foreach ($event[ 'listeners' ] as $listener) { |
|
188 | + Event::listen($event[ 'class' ], $listener); |
|
189 | 189 | } |
190 | 190 | } |
191 | 191 | } |
@@ -176,8 +176,9 @@ discard block |
||
176 | 176 | private function loadServiceProviders() |
177 | 177 | { |
178 | 178 | foreach ($this->bootstrapService->getProviders() as $provider) { |
179 | - if ($this->passedRegistrationCondition($provider)) |
|
180 | - $this->app->register($provider); |
|
179 | + if ($this->passedRegistrationCondition($provider)) { |
|
180 | + $this->app->register($provider); |
|
181 | + } |
|
181 | 182 | } |
182 | 183 | } |
183 | 184 | |
@@ -192,8 +193,9 @@ discard block |
||
192 | 193 | |
193 | 194 | private function passedRegistrationCondition($class) |
194 | 195 | { |
195 | - if (!class_implements_interface($class, ConditionalAutoRegistration::class)) |
|
196 | - return true; |
|
196 | + if (!class_implements_interface($class, ConditionalAutoRegistration::class)) { |
|
197 | + return true; |
|
198 | + } |
|
197 | 199 | return run_class_function($class, 'registrationCondition'); |
198 | 200 | } |
199 | 201 | } |