@@ -68,7 +68,7 @@ |
||
68 | 68 | */ |
69 | 69 | protected static function getFoldersPermissions(array $folders): array |
70 | 70 | { |
71 | - return array_map(function ($folder) { |
|
71 | + return array_map(function($folder) { |
|
72 | 72 | $path = base_path($folder); |
73 | 73 | |
74 | 74 | return [ |
@@ -68,7 +68,7 @@ |
||
68 | 68 | */ |
69 | 69 | protected static function getRequiredExtensions(array $extensions): array |
70 | 70 | { |
71 | - return array_map(function ($extension) { |
|
71 | + return array_map(function($extension) { |
|
72 | 72 | return extension_loaded($extension); |
73 | 73 | }, array_combine($extensions, $extensions)); |
74 | 74 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | */ |
41 | 41 | public function boot(): void |
42 | 42 | { |
43 | - Gate::after(function ($user, string $ability) { |
|
43 | + Gate::after(function($user, string $ability) { |
|
44 | 44 | /** @var \App\Models\User $user */ |
45 | 45 | return $user->isAdmin() |
46 | 46 | || $user->may($ability); |
@@ -70,7 +70,8 @@ |
||
70 | 70 | */ |
71 | 71 | public function index(AuthenticatedUser $user) |
72 | 72 | { |
73 | - if ($user->isModerator()) |
|
74 | - return true; |
|
73 | + if ($user->isModerator()) { |
|
74 | + return true; |
|
75 | + } |
|
75 | 76 | } |
76 | 77 | } |
@@ -28,8 +28,8 @@ |
||
28 | 28 | $this->prefix('metrics')->name('foundation.metrics.')->group(function () { |
29 | 29 | // api-admin::foundation.metrics.process |
30 | 30 | $this->get('process', [MetricsController::class, 'process']) |
31 | - ->middleware(['ajax']) |
|
32 | - ->name('process'); |
|
31 | + ->middleware(['ajax']) |
|
32 | + ->name('process'); |
|
33 | 33 | }); |
34 | 34 | }); |
35 | 35 | } |
@@ -24,8 +24,8 @@ |
||
24 | 24 | */ |
25 | 25 | public function map(): void |
26 | 26 | { |
27 | - $this->adminGroup(function () { |
|
28 | - $this->prefix('metrics')->name('foundation.metrics.')->group(function () { |
|
27 | + $this->adminGroup(function() { |
|
28 | + $this->prefix('metrics')->name('foundation.metrics.')->group(function() { |
|
29 | 29 | // api-admin::foundation.metrics.process |
30 | 30 | $this->get('process', [MetricsController::class, 'process']) |
31 | 31 | ->middleware(['ajax']) |
@@ -28,7 +28,7 @@ |
||
28 | 28 | $this->prefix('api')->name('api.')->middleware(['ajax'])->group(function () { |
29 | 29 | $this->prefix('events')->name('events.')->group(function () { |
30 | 30 | $this->post('/', [EventsController::class, 'handle']) |
31 | - ->name('handle'); |
|
31 | + ->name('handle'); |
|
32 | 32 | }); |
33 | 33 | }); |
34 | 34 | }); |
@@ -24,9 +24,9 @@ |
||
24 | 24 | */ |
25 | 25 | public function map(): void |
26 | 26 | { |
27 | - $this->adminGroup(function () { |
|
28 | - $this->prefix('api')->name('api.')->middleware(['ajax'])->group(function () { |
|
29 | - $this->prefix('events')->name('events.')->group(function () { |
|
27 | + $this->adminGroup(function() { |
|
28 | + $this->prefix('api')->name('api.')->middleware(['ajax'])->group(function() { |
|
29 | + $this->prefix('events')->name('events.')->group(function() { |
|
30 | 30 | $this->post('/', [EventsController::class, 'handle']) |
31 | 31 | ->name('handle'); |
32 | 32 | }); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | $this->adminGroup(function () { |
28 | 28 | // admin::index |
29 | 29 | $this->get('/', [DashboardController::class, 'index']) |
30 | - ->name('index'); |
|
30 | + ->name('index'); |
|
31 | 31 | }); |
32 | 32 | } |
33 | 33 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function map(): void |
26 | 26 | { |
27 | - $this->adminGroup(function () { |
|
27 | + $this->adminGroup(function() { |
|
28 | 28 | // admin::index |
29 | 29 | $this->get('/', [DashboardController::class, 'index']) |
30 | 30 | ->name('index'); |
@@ -36,7 +36,8 @@ |
||
36 | 36 | */ |
37 | 37 | protected function ensureUserIsActivated($user) |
38 | 38 | { |
39 | - if (is_null($user) || ! $user->isActive()) |
|
40 | - abort(403, 'Forbidden'); |
|
39 | + if (is_null($user) || ! $user->isActive()) { |
|
40 | + abort(403, 'Forbidden'); |
|
41 | + } |
|
41 | 42 | } |
42 | 43 | } |
@@ -24,8 +24,9 @@ |
||
24 | 24 | */ |
25 | 25 | public function handle($request, Closure $next) |
26 | 26 | { |
27 | - if ( ! $this->isAjaxRequest($request)) |
|
28 | - abort(400, 'Bad Request'); |
|
27 | + if ( ! $this->isAjaxRequest($request)) { |
|
28 | + abort(400, 'Bad Request'); |
|
29 | + } |
|
29 | 30 | |
30 | 31 | return $next($request); |
31 | 32 | } |