@@ -24,7 +24,7 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function saveMany(array $data) |
| 26 | 26 | { |
| 27 | - \DB::transaction(function () use ($data) { |
|
| 27 | + \DB::transaction(function() use ($data) { |
|
| 28 | 28 | foreach ($data as $value) { |
| 29 | 29 | $this->repo->save($value); |
| 30 | 30 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | /** |
| 19 | 19 | * Assign the permissions to the admin role. |
| 20 | 20 | */ |
| 21 | - \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['report'])->each(function ($permission) use ($adminRoleId) { |
|
| 21 | + \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['report'])->each(function($permission) use ($adminRoleId) { |
|
| 22 | 22 | \DB::table('permission_role')->insert( |
| 23 | 23 | [ |
| 24 | 24 | 'permission_id' => $permission->id, |
@@ -11,6 +11,6 @@ |
||
| 11 | 11 | | |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | -Broadcast::channel('users.{id}', function ($user, $id) {
|
|
| 14 | +Broadcast::channel('users.{id}', function($user, $id) {
|
|
| 15 | 15 | return (int) $user->id === (int) $id; |
| 16 | 16 | }); |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | {
|
| 26 | 26 | $this->registerPolicies(); |
| 27 | 27 | |
| 28 | - Passport::routes(function ($router) {
|
|
| 28 | + Passport::routes(function($router) {
|
|
| 29 | 29 | $router->forAuthorization(); |
| 30 | 30 | $router->forAccessTokens(); |
| 31 | 31 | $router->forPersonalAccessTokens(); |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | |
| 50 | 50 | $response = \ApiConsumer::post('/oauth/token', $data); |
| 51 | 51 | |
| 52 | - if (! $response->isSuccessful()) { |
|
| 52 | + if ( ! $response->isSuccessful()) { |
|
| 53 | 53 | if ($grantType == 'refresh_token') { |
| 54 | 54 | \Errors::invalidRefreshToken(); |
| 55 | 55 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | public function updated($model) |
| 37 | 37 | { |
| 38 | 38 | if ($model->isDirty('blocked') && $model->blocked) { |
| 39 | - $model->tokens()->each(function ($token) { |
|
| 39 | + $model->tokens()->each(function($token) { |
|
| 40 | 40 | \Core::oauthClients()->revokeAccessToken($token); |
| 41 | 41 | }); |
| 42 | 42 | } |
@@ -43,9 +43,9 @@ |
||
| 43 | 43 | /** |
| 44 | 44 | * Check report existance and permission. |
| 45 | 45 | */ |
| 46 | - if (! $report) { |
|
| 46 | + if ( ! $report) { |
|
| 47 | 47 | \Errors::notFound('report'); |
| 48 | - } elseif (! $skipPermission && ! $this->userService->can($report->view_name, 'report')) { |
|
| 48 | + } elseif ( ! $skipPermission && ! $this->userService->can($report->view_name, 'report')) { |
|
| 49 | 49 | \Errors::noPermissions(); |
| 50 | 50 | } |
| 51 | 51 | |
@@ -19,8 +19,8 @@ |
||
| 19 | 19 | public function __call($name, $arguments) |
| 20 | 20 | { |
| 21 | 21 | foreach (\Module::all() as $module) { |
| 22 | - $nameSpace = 'App\\Modules\\' . $module['basename']; |
|
| 23 | - $class = $nameSpace . '\\Errors\\' . $module['basename'] . 'Errors'; |
|
| 22 | + $nameSpace = 'App\\Modules\\'.$module['basename']; |
|
| 23 | + $class = $nameSpace.'\\Errors\\'.$module['basename'].'Errors'; |
|
| 24 | 24 | |
| 25 | 25 | if (class_exists($class)) { |
| 26 | 26 | $class = \App::make($class); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | | |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | -Route::group(['prefix' => 'oauth/clients'], function () { |
|
| 14 | +Route::group(['prefix' => 'oauth/clients'], function() { |
|
| 15 | 15 | |
| 16 | 16 | Route::get('/', 'OauthClientController@index'); |
| 17 | 17 | Route::get('{id}', 'OauthClientController@show'); |