@@ -11,6 +11,6 @@ |
||
| 11 | 11 | | |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | -Broadcast::channel('user.{id}', function ($user, $id) { |
|
| 14 | +Broadcast::channel('user.{id}', function($user, $id) { |
|
| 15 | 15 | return $user->identity_id === $id; |
| 16 | 16 | }); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @var array |
| 28 | 28 | */ |
| 29 | - protected $guarded = []; |
|
| 29 | + protected $guarded = [ ]; |
|
| 30 | 30 | /** |
| 31 | 31 | * The attributes that should be cast to native types. |
| 32 | 32 | * |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | public function markAsRead() |
| 54 | 54 | { |
| 55 | 55 | if (is_null($this->read_at)) { |
| 56 | - $this->forceFill(['read_at' => $this->freshTimestamp()])->save(); |
|
| 56 | + $this->forceFill([ 'read_at' => $this->freshTimestamp() ])->save(); |
|
| 57 | 57 | } |
| 58 | 58 | } |
| 59 | 59 | |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | * |
| 85 | 85 | * @return \Illuminate\Notifications\DatabaseNotificationCollection |
| 86 | 86 | */ |
| 87 | - public function newCollection(array $models = []) |
|
| 87 | + public function newCollection(array $models = [ ]) |
|
| 88 | 88 | { |
| 89 | 89 | return new DatabaseNotificationCollection($models); |
| 90 | 90 | } |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | public function boot() |
| 16 | 16 | { |
| 17 | 17 | Broadcast::routes([ |
| 18 | - 'middleware' => ['api'], |
|
| 18 | + 'middleware' => [ 'api' ], |
|
| 19 | 19 | 'domain' => env('API_URL'), |
| 20 | 20 | ]); |
| 21 | 21 | |
@@ -74,16 +74,16 @@ discard block |
||
| 74 | 74 | private function loadRoutes() |
| 75 | 75 | { |
| 76 | 76 | foreach ($this->bootstrapService->getRoutes() as $route) { |
| 77 | - $path = $route['path']; |
|
| 77 | + $path = $route[ 'path' ]; |
|
| 78 | 78 | Route::group([ |
| 79 | - 'prefix' => 'v1/'.str_plural($route['module']), |
|
| 80 | - 'namespace' => $route['controller'], |
|
| 81 | - 'domain' => $route['domain'], |
|
| 82 | - 'middleware' => ['api'], |
|
| 83 | - ], function () use ($path) { |
|
| 79 | + 'prefix' => 'v1/'.str_plural($route[ 'module' ]), |
|
| 80 | + 'namespace' => $route[ 'controller' ], |
|
| 81 | + 'domain' => $route[ 'domain' ], |
|
| 82 | + 'middleware' => [ 'api' ], |
|
| 83 | + ], function() use ($path) { |
|
| 84 | 84 | require $path; |
| 85 | 85 | }); |
| 86 | - Route::model($route['module'], $route['model']); |
|
| 86 | + Route::model($route[ 'module' ], $route[ 'model' ]); |
|
| 87 | 87 | } |
| 88 | 88 | } |
| 89 | 89 | |
@@ -95,12 +95,12 @@ discard block |
||
| 95 | 95 | protected function loadConfigs() |
| 96 | 96 | { |
| 97 | 97 | foreach ($this->bootstrapService->getConfigs() as $config) { |
| 98 | - if ($config['filename'] === 'config.php') { |
|
| 98 | + if ($config[ 'filename' ] === 'config.php') { |
|
| 99 | 99 | $this->publishes([ |
| 100 | - $config['path'] => config_path($config['module']), |
|
| 100 | + $config[ 'path' ] => config_path($config[ 'module' ]), |
|
| 101 | 101 | ], 'config'); |
| 102 | 102 | $this->mergeConfigFrom( |
| 103 | - $config['path'], basename($config['module'], '.php') |
|
| 103 | + $config[ 'path' ], basename($config[ 'module' ], '.php') |
|
| 104 | 104 | ); |
| 105 | 105 | } |
| 106 | 106 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | { |
| 116 | 116 | foreach ($this->bootstrapService->getFactories() as $factory) { |
| 117 | 117 | if (!$this->app->environment('production')) { |
| 118 | - app(Factory::class)->load($factory['path']); |
|
| 118 | + app(Factory::class)->load($factory[ 'path' ]); |
|
| 119 | 119 | } |
| 120 | 120 | } |
| 121 | 121 | } |
@@ -128,15 +128,15 @@ discard block |
||
| 128 | 128 | public function loadMigrations() |
| 129 | 129 | { |
| 130 | 130 | foreach ($this->bootstrapService->getMigrations() as $migration) { |
| 131 | - $this->loadMigrationsFrom($migration['path']); |
|
| 131 | + $this->loadMigrationsFrom($migration[ 'path' ]); |
|
| 132 | 132 | } |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | private function loadPolicies() |
| 136 | 136 | { |
| 137 | 137 | foreach ($this->bootstrapService->getPolicies() as $policy) { |
| 138 | - if (class_implements_interface($policy['class'], ModelPolicyContract::class)) { |
|
| 139 | - Gate::policy($policy['model'], $policy['class']); |
|
| 138 | + if (class_implements_interface($policy[ 'class' ], ModelPolicyContract::class)) { |
|
| 139 | + Gate::policy($policy[ 'model' ], $policy[ 'class' ]); |
|
| 140 | 140 | } |
| 141 | 141 | } |
| 142 | 142 | } |
@@ -145,8 +145,8 @@ discard block |
||
| 145 | 145 | { |
| 146 | 146 | $app = $this->app; |
| 147 | 147 | $service = $this->bootstrapService; |
| 148 | - $this->app->extend('command.seed', function () use ($app, $service) { |
|
| 149 | - return new SeedCommand($app['db'], $service); |
|
| 148 | + $this->app->extend('command.seed', function() use ($app, $service) { |
|
| 149 | + return new SeedCommand($app[ 'db' ], $service); |
|
| 150 | 150 | }); |
| 151 | 151 | } |
| 152 | 152 | |
@@ -179,8 +179,8 @@ discard block |
||
| 179 | 179 | private function loadListeners() |
| 180 | 180 | { |
| 181 | 181 | foreach ($this->bootstrapService->getEvents() as $event) { |
| 182 | - foreach ($event['listeners'] as $listener) { |
|
| 183 | - Event::listen($event['class'], $listener); |
|
| 182 | + foreach ($event[ 'listeners' ] as $listener) { |
|
| 183 | + Event::listen($event[ 'class' ], $listener); |
|
| 184 | 184 | } |
| 185 | 185 | } |
| 186 | 186 | } |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | $profile = $this->transformer->transformProfile($this->profile); |
| 112 | 112 | |
| 113 | 113 | if ($this->profileHasChanged()) { |
| 114 | - $profile['provider'] = $this->identityProvider; |
|
| 114 | + $profile[ 'provider' ] = $this->identityProvider; |
|
| 115 | 115 | $this->user->fill($profile); |
| 116 | 116 | $this->user->save(); |
| 117 | 117 | } |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function boot() |
| 32 | 32 | { |
| 33 | - $this->app->bind(\Auth0\Login\Contract\Auth0UserRepository::class, function () { |
|
| 33 | + $this->app->bind(\Auth0\Login\Contract\Auth0UserRepository::class, function() { |
|
| 34 | 34 | return new Auth0Service(new UserService()); |
| 35 | 35 | }); |
| 36 | 36 | } |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Faker\Generator as Faker; |
| 4 | 4 | |
| 5 | -$factory->define(Modules\Machine\Entities\Machine::class, function (Faker $faker) { |
|
| 5 | +$factory->define(Modules\Machine\Entities\Machine::class, function(Faker $faker) { |
|
| 6 | 6 | $os = [ |
| 7 | 7 | 'MAC', |
| 8 | 8 | 'WINDOWS', |
@@ -99,6 +99,6 @@ |
||
| 99 | 99 | |
| 100 | 100 | $this->authorize('delete', $machine); |
| 101 | 101 | |
| 102 | - return \response()->json(['deleted']); |
|
| 102 | + return \response()->json([ 'deleted' ]); |
|
| 103 | 103 | } |
| 104 | 104 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | /** |
| 32 | 32 | * @var array |
| 33 | 33 | */ |
| 34 | - protected $guarded = []; |
|
| 34 | + protected $guarded = [ ]; |
|
| 35 | 35 | |
| 36 | 36 | public function user() |
| 37 | 37 | { |