@@ -19,6 +19,6 @@ |
||
19 | 19 | |
20 | 20 | public function registrationCondition(): bool |
21 | 21 | { |
22 | - return ! app()->environment('testing'); |
|
22 | + return !app()->environment('testing'); |
|
23 | 23 | } |
24 | 24 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | protected function getArguments() |
51 | 51 | { |
52 | 52 | return [ |
53 | - ['example', InputArgument::REQUIRED, 'An example argument.'], |
|
53 | + [ 'example', InputArgument::REQUIRED, 'An example argument.' ], |
|
54 | 54 | ]; |
55 | 55 | } |
56 | 56 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | protected function getOptions() |
63 | 63 | { |
64 | 64 | return [ |
65 | - ['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null], |
|
65 | + [ 'example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null ], |
|
66 | 66 | ]; |
67 | 67 | } |
68 | 68 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | /** |
38 | 38 | * @var array |
39 | 39 | */ |
40 | - protected $guarded = []; |
|
40 | + protected $guarded = [ ]; |
|
41 | 41 | |
42 | 42 | protected $casts = [ |
43 | 43 | 'monitor' => 'boolean', |
@@ -13,9 +13,9 @@ |
||
13 | 13 | |
14 | 14 | use Modules\Authorization\Entities\Permission; |
15 | 15 | |
16 | -Route::get('/{id}', 'ProxyController@show')->middleware(['permission:'.Permission::SHOW_PROXY]); |
|
17 | -Route::patch('/{id}', 'ProxyController@update')->middleware(['permission:'.Permission::UPDATE_PROXY]); |
|
18 | -Route::delete('/{id}', 'ProxyController@destroy')->middleware(['permission:'.Permission::DELETE_PROXY]); |
|
16 | +Route::get('/{id}', 'ProxyController@show')->middleware([ 'permission:'.Permission::SHOW_PROXY ]); |
|
17 | +Route::patch('/{id}', 'ProxyController@update')->middleware([ 'permission:'.Permission::UPDATE_PROXY ]); |
|
18 | +Route::delete('/{id}', 'ProxyController@destroy')->middleware([ 'permission:'.Permission::DELETE_PROXY ]); |
|
19 | 19 | |
20 | -Route::post('/', 'ProxyController@store')->middleware(['permission:'.Permission::CREATE_PROXY]); |
|
21 | -Route::get('/', 'ProxyController@index')->middleware(['permission:'.Permission::INDEX_PROXY]); |
|
20 | +Route::post('/', 'ProxyController@store')->middleware([ 'permission:'.Permission::CREATE_PROXY ]); |
|
21 | +Route::get('/', 'ProxyController@index')->middleware([ 'permission:'.Permission::INDEX_PROXY ]); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | |
17 | 17 | class ProxyUpdatedEvent extends Event implements ShouldBroadcast |
18 | 18 | { |
19 | - public $listeners = []; |
|
19 | + public $listeners = [ ]; |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * @var proxy |
@@ -13,8 +13,8 @@ |
||
13 | 13 | |
14 | 14 | use Modules\Authorization\Entities\Permission; |
15 | 15 | |
16 | -Route::get('/{id}', 'ScheduleController@show')->middleware(['permission:'.Permission::SHOW_SCHEDULE]); |
|
17 | -Route::patch('/{id}', 'ScheduleController@update')->middleware(['permission:'.Permission::UPDATE_SCHEDULE]); |
|
18 | -Route::delete('/{id}', 'ScheduleController@destroy')->middleware(['permission:'.Permission::DELETE_SCHEDULE]); |
|
19 | -Route::post('/', 'ScheduleController@store')->middleware(['permission:'.Permission::CREATE_SCHEDULE]); |
|
20 | -Route::get('/', 'ScheduleController@index')->middleware(['permission:'.Permission::INDEX_SCHEDULE]); |
|
16 | +Route::get('/{id}', 'ScheduleController@show')->middleware([ 'permission:'.Permission::SHOW_SCHEDULE ]); |
|
17 | +Route::patch('/{id}', 'ScheduleController@update')->middleware([ 'permission:'.Permission::UPDATE_SCHEDULE ]); |
|
18 | +Route::delete('/{id}', 'ScheduleController@destroy')->middleware([ 'permission:'.Permission::DELETE_SCHEDULE ]); |
|
19 | +Route::post('/', 'ScheduleController@store')->middleware([ 'permission:'.Permission::CREATE_SCHEDULE ]); |
|
20 | +Route::get('/', 'ScheduleController@index')->middleware([ 'permission:'.Permission::INDEX_SCHEDULE ]); |
@@ -49,17 +49,17 @@ |
||
49 | 49 | |
50 | 50 | public function getUserByUserInfo($userInfo) |
51 | 51 | { |
52 | - return $this->upsertUser($userInfo['profile']); |
|
52 | + return $this->upsertUser($userInfo[ 'profile' ]); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | protected function upsertUser($profile) |
56 | 56 | { |
57 | - if (! isset($profile->user_id)) { |
|
57 | + if (!isset($profile->user_id)) { |
|
58 | 58 | throw new BadRequestHttpException('Missing token information: Auth0 user id is not set'); |
59 | 59 | } |
60 | 60 | $identifier = explode('|', $profile->user_id); |
61 | - $identityProvider = $identifier[0]; |
|
62 | - $id = $identifier[1]; |
|
61 | + $identityProvider = $identifier[ 0 ]; |
|
62 | + $id = $identifier[ 1 ]; |
|
63 | 63 | |
64 | 64 | $user = $this->service->findByIdentityId($id); |
65 | 65 | if ($user === null) { |
@@ -28,16 +28,16 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function handle() |
30 | 30 | { |
31 | - if (! $this->confirmToProceed()) { |
|
31 | + if (!$this->confirmToProceed()) { |
|
32 | 32 | return; |
33 | 33 | } |
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 | - $seeder = $this->laravel->make($seeder['class']); |
|
40 | - if (! isset($seeder->enabled) || $seeder->enabled) { |
|
39 | + $seeder = $this->laravel->make($seeder[ 'class' ]); |
|
40 | + if (!isset($seeder->enabled) || $seeder->enabled) { |
|
41 | 41 | $seeder->__invoke(); |
42 | 42 | } |
43 | 43 | } |
@@ -50,6 +50,6 @@ discard block |
||
50 | 50 | { |
51 | 51 | $this->service = $this->laravel->make(BootstrapRegistrarService::class); |
52 | 52 | |
53 | - return $this->service->getSeeders() ?? []; |
|
53 | + return $this->service->getSeeders() ?? [ ]; |
|
54 | 54 | } |
55 | 55 | } |
@@ -32,9 +32,9 @@ discard block |
||
32 | 32 | |
33 | 33 | foreach ($names as $name) { |
34 | 34 | with(new ModuleGenerator($name)) |
35 | - ->setFilesystem($this->laravel['files']) |
|
36 | - ->setModule($this->laravel['modules']) |
|
37 | - ->setConfig($this->laravel['config']) |
|
35 | + ->setFilesystem($this->laravel[ 'files' ]) |
|
36 | + ->setModule($this->laravel[ 'modules' ]) |
|
37 | + ->setConfig($this->laravel[ 'config' ]) |
|
38 | 38 | ->setConsole($this) |
39 | 39 | ->setForce($this->option('force')) |
40 | 40 | ->setPlain($this->option('plain')) |
@@ -50,15 +50,15 @@ discard block |
||
50 | 50 | protected function getArguments() |
51 | 51 | { |
52 | 52 | return [ |
53 | - ['name', InputArgument::IS_ARRAY, 'The names of modules will be created.'], |
|
53 | + [ 'name', InputArgument::IS_ARRAY, 'The names of modules will be created.' ], |
|
54 | 54 | ]; |
55 | 55 | } |
56 | 56 | |
57 | 57 | protected function getOptions() |
58 | 58 | { |
59 | 59 | return [ |
60 | - ['plain', 'p', InputOption::VALUE_NONE, 'Generate a plain module (without some resources).'], |
|
61 | - ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when the module already exists.'], |
|
60 | + [ 'plain', 'p', InputOption::VALUE_NONE, 'Generate a plain module (without some resources).' ], |
|
61 | + [ 'force', null, InputOption::VALUE_NONE, 'Force the operation to run when the module already exists.' ], |
|
62 | 62 | ]; |
63 | 63 | } |
64 | 64 | } |