@@ -53,10 +53,10 @@ |
||
| 53 | 53 | protected function getPermissionsFromPolicyManager($abilities): Collection |
| 54 | 54 | { |
| 55 | 55 | return $this->policyManager()->abilities() |
| 56 | - ->filter(function (Ability $ability) use ($abilities) { |
|
| 56 | + ->filter(function(Ability $ability) use ($abilities) { |
|
| 57 | 57 | return Str::startsWith($ability->key(), $abilities); |
| 58 | 58 | }) |
| 59 | - ->transform(function (Ability $ability) { |
|
| 59 | + ->transform(function(Ability $ability) { |
|
| 60 | 60 | return new Permission(array_merge($ability->metas(), [ |
| 61 | 61 | 'ability' => $ability->key(), |
| 62 | 62 | ])); |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | public function seedMany(array $roles): void |
| 31 | 31 | { |
| 32 | - $roles = array_map(function (array $role) { |
|
| 32 | + $roles = array_map(function(array $role) { |
|
| 33 | 33 | return static::prepareRole($role); |
| 34 | 34 | }, $roles); |
| 35 | 35 | |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | { |
| 130 | 130 | $needles = Arr::wrap($needles); |
| 131 | 131 | |
| 132 | - return $permissions->filter(function ($ability) use ($needles) { |
|
| 132 | + return $permissions->filter(function($ability) use ($needles) { |
|
| 133 | 133 | return Str::startsWith($ability, $needles) || Str::is($needles, $ability); |
| 134 | 134 | })->keys()->toArray(); |
| 135 | 135 | } |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function boot(): void |
| 43 | 43 | { |
| 44 | - Gate::after(function (Administrator $admin, string $ability) { |
|
| 44 | + Gate::after(function(Administrator $admin, string $ability) { |
|
| 45 | 45 | return $admin->isSuperAdmin() |
| 46 | 46 | || $admin->may($ability); |
| 47 | 47 | }); |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | public function map(): void |
| 24 | 24 | { |
| 25 | - $this->adminGroup(function () { |
|
| 25 | + $this->adminGroup(function() { |
|
| 26 | 26 | static::mapRouteClasses([ |
| 27 | 27 | Web\DashboardRoutes::class, |
| 28 | 28 | ]); |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | public function map(): void |
| 29 | 29 | { |
| 30 | - $this->adminApiGroup(function () { |
|
| 30 | + $this->adminApiGroup(function() { |
|
| 31 | 31 | static::mapRouteClasses([ |
| 32 | 32 | EventsRoutes::class, |
| 33 | 33 | ComponentsRoutes::class, |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function map(): void |
| 27 | 27 | { |
| 28 | - $this->prefix('components')->name('components.')->group(function () { |
|
| 28 | + $this->prefix('components')->name('components.')->group(function() { |
|
| 29 | 29 | // admin::api.components.handle |
| 30 | 30 | $this->post('/', [ComponentsController::class, 'handle']) |
| 31 | 31 | ->name('handle'); |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function map(): void |
| 27 | 27 | { |
| 28 | - $this->prefix('metrics')->name('metrics.')->group(function () { |
|
| 28 | + $this->prefix('metrics')->name('metrics.')->group(function() { |
|
| 29 | 29 | // admin::api.metrics.handle |
| 30 | 30 | $this->post('/', [MetricsController::class, 'handle']) |
| 31 | 31 | ->name('handle'); |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function map(): void |
| 27 | 27 | { |
| 28 | - $this->prefix('events')->name('events.')->group(function () { |
|
| 28 | + $this->prefix('events')->name('events.')->group(function() { |
|
| 29 | 29 | // admin::api.events.handle |
| 30 | 30 | $this->post('/', [EventsController::class, 'handle']) |
| 31 | 31 | ->name('handle'); |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | { |
| 61 | 61 | $view->with( |
| 62 | 62 | 'foundationNotifications', |
| 63 | - $this->notifier->notifications()->transform(function (array $notification) { |
|
| 63 | + $this->notifier->notifications()->transform(function(array $notification) { |
|
| 64 | 64 | return static::prepareNotification($notification); |
| 65 | 65 | }) |
| 66 | 66 | ); |