@@ -42,8 +42,9 @@ discard block |
||
42 | 42 | { |
43 | 43 | $data = $this->data(); |
44 | 44 | |
45 | - if (method_exists($this, 'initializeWithPagination')) |
|
46 | - $this->initializeWithPagination(); |
|
45 | + if (method_exists($this, 'initializeWithPagination')) { |
|
46 | + $this->initializeWithPagination(); |
|
47 | + } |
|
47 | 48 | |
48 | 49 | /** @var \Illuminate\View\View $view */ |
49 | 50 | $view = app()->call([$this, 'render']); |
@@ -87,8 +88,9 @@ discard block |
||
87 | 88 | |
88 | 89 | $actions = (array) $request->input('actions'); |
89 | 90 | |
90 | - if ( ! empty($actions)) |
|
91 | - $this->handleComponentActions($actions); |
|
91 | + if ( ! empty($actions)) { |
|
92 | + $this->handleComponentActions($actions); |
|
93 | + } |
|
92 | 94 | |
93 | 95 | return $this; |
94 | 96 | } |
@@ -52,7 +52,7 @@ |
||
52 | 52 | * @param string|array $name |
53 | 53 | * @param string|null $component |
54 | 54 | */ |
55 | - public function register($name, string $component= null): void |
|
55 | + public function register($name, string $component = null): void |
|
56 | 56 | { |
57 | 57 | if (is_array($name)) { |
58 | 58 | foreach ($name as $key => $class) { |
@@ -88,8 +88,9 @@ |
||
88 | 88 | */ |
89 | 89 | public function make(string $name): Component |
90 | 90 | { |
91 | - if ( ! $this->hasComponent($name)) |
|
92 | - throw ComponentNotFound::make($name); |
|
91 | + if ( ! $this->hasComponent($name)) { |
|
92 | + throw ComponentNotFound::make($name); |
|
93 | + } |
|
93 | 94 | |
94 | 95 | return $this->app->make($this->components[$name]); |
95 | 96 | } |
@@ -72,8 +72,9 @@ discard block |
||
72 | 72 | */ |
73 | 73 | private static function getAuthProviderKey($notifiable): string |
74 | 74 | { |
75 | - if ($notifiable instanceof Administrator) |
|
76 | - return 'admins'; |
|
75 | + if ($notifiable instanceof Administrator) { |
|
76 | + return 'admins'; |
|
77 | + } |
|
77 | 78 | |
78 | 79 | return 'users'; |
79 | 80 | } |
@@ -87,8 +88,9 @@ discard block |
||
87 | 88 | */ |
88 | 89 | protected static function getPasswordResetRoute($authProviderKey): string |
89 | 90 | { |
90 | - if ($authProviderKey === 'admins') |
|
91 | - return 'admin::auth.password.reset'; |
|
91 | + if ($authProviderKey === 'admins') { |
|
92 | + return 'admin::auth.password.reset'; |
|
93 | + } |
|
92 | 94 | |
93 | 95 | return 'auth::password.reset'; |
94 | 96 | } |
@@ -54,11 +54,13 @@ |
||
54 | 54 | { |
55 | 55 | $session = $event->session; |
56 | 56 | |
57 | - if ($session->isVisitor()) |
|
58 | - return; |
|
57 | + if ($session->isVisitor()) { |
|
58 | + return; |
|
59 | + } |
|
59 | 60 | |
60 | - if ( ! $session->isSameUser($authenticated = $this->getAuthenticated())) |
|
61 | - return; |
|
61 | + if ( ! $session->isSameUser($authenticated = $this->getAuthenticated())) { |
|
62 | + return; |
|
63 | + } |
|
62 | 64 | |
63 | 65 | $authenticated->forceFill([ |
64 | 66 | 'last_activity_at' => $session->last_activity_at, |
@@ -72,8 +72,9 @@ |
||
72 | 72 | */ |
73 | 73 | public function verified($date = null): self |
74 | 74 | { |
75 | - if (is_null($date)) |
|
76 | - $date = now(); |
|
75 | + if (is_null($date)) { |
|
76 | + $date = now(); |
|
77 | + } |
|
77 | 78 | |
78 | 79 | return $this->state([ |
79 | 80 | 'email_verified_at' => $date === false ? null : $date, |
@@ -43,7 +43,7 @@ |
||
43 | 43 | */ |
44 | 44 | protected function registerCustomSessionHandler(SessionManager $session): void |
45 | 45 | { |
46 | - $session->extend('arcanesoft', function (Container $app) { |
|
46 | + $session->extend('arcanesoft', function(Container $app) { |
|
47 | 47 | return new DatabaseSessionHandler($app->make(SessionsRepository::class), $app); |
48 | 48 | }); |
49 | 49 | } |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | */ |
33 | 33 | public function map(): void |
34 | 34 | { |
35 | - $this->adminGroup(function () { |
|
36 | - $this->name('users.')->prefix('users')->group(function () { |
|
35 | + $this->adminGroup(function() { |
|
36 | + $this->name('users.')->prefix('users')->group(function() { |
|
37 | 37 | // admin::auth.users.index |
38 | 38 | $this->get('/', [UsersController::class, 'index']) |
39 | 39 | ->name('index'); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $this->post('store', [UsersController::class, 'store']) |
55 | 55 | ->name('store'); |
56 | 56 | |
57 | - $this->prefix('{'.static::USER_WILDCARD.'}')->group(function () { |
|
57 | + $this->prefix('{'.static::USER_WILDCARD.'}')->group(function() { |
|
58 | 58 | // admin::auth.users.show |
59 | 59 | $this->get('/', [UsersController::class, 'show']) |
60 | 60 | ->name('show'); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function bindings(UsersRepository $repo): void |
101 | 101 | { |
102 | - $this->bind(static::USER_WILDCARD, function (string $uuid) use ($repo) { |
|
102 | + $this->bind(static::USER_WILDCARD, function(string $uuid) use ($repo) { |
|
103 | 103 | return $repo->firstWhereUuidOrFail($uuid); |
104 | 104 | }); |
105 | 105 | } |
@@ -35,61 +35,61 @@ |
||
35 | 35 | $this->name('users.')->prefix('users')->group(function () { |
36 | 36 | // admin::auth.users.index |
37 | 37 | $this->get('/', [UsersController::class, 'index']) |
38 | - ->name('index'); |
|
38 | + ->name('index'); |
|
39 | 39 | |
40 | 40 | // admin::auth.users.trash |
41 | 41 | $this->get('trash', [UsersController::class, 'trash']) |
42 | - ->name('trash'); |
|
42 | + ->name('trash'); |
|
43 | 43 | |
44 | 44 | // admin::auth.users.metrics |
45 | 45 | $this->get('metrics', [UsersController::class, 'metrics']) |
46 | - ->name('metrics'); |
|
46 | + ->name('metrics'); |
|
47 | 47 | |
48 | 48 | // admin::auth.users.create |
49 | 49 | $this->get('create', [UsersController::class, 'create']) |
50 | - ->name('create'); |
|
50 | + ->name('create'); |
|
51 | 51 | |
52 | 52 | // admin::auth.users.post |
53 | 53 | $this->post('store', [UsersController::class, 'store']) |
54 | - ->name('store'); |
|
54 | + ->name('store'); |
|
55 | 55 | |
56 | 56 | $this->prefix('{'.static::USER_WILDCARD.'}')->group(function () { |
57 | 57 | // admin::auth.users.show |
58 | 58 | $this->get('/', [UsersController::class, 'show']) |
59 | - ->name('show'); |
|
59 | + ->name('show'); |
|
60 | 60 | |
61 | 61 | // admin::auth.users.edit |
62 | 62 | $this->get('edit', [UsersController::class, 'edit']) |
63 | - ->name('edit'); |
|
63 | + ->name('edit'); |
|
64 | 64 | |
65 | 65 | // admin::auth.users.update |
66 | 66 | $this->put('update', [UsersController::class, 'update']) |
67 | - ->name('update'); |
|
67 | + ->name('update'); |
|
68 | 68 | |
69 | 69 | // admin::auth.users.activate |
70 | 70 | $this->put('activate', [UsersController::class, 'activate']) |
71 | - ->middleware(['ajax']) |
|
72 | - ->name('activate'); |
|
71 | + ->middleware(['ajax']) |
|
72 | + ->name('activate'); |
|
73 | 73 | |
74 | 74 | // admin::auth.users.deactivate |
75 | 75 | $this->put('deactivate', [UsersController::class, 'deactivate']) |
76 | - ->middleware(['ajax']) |
|
77 | - ->name('deactivate'); |
|
76 | + ->middleware(['ajax']) |
|
77 | + ->name('deactivate'); |
|
78 | 78 | |
79 | 79 | // admin::auth.users.delete |
80 | 80 | $this->delete('delete', [UsersController::class, 'delete']) |
81 | - ->middleware(['ajax']) |
|
82 | - ->name('delete'); |
|
81 | + ->middleware(['ajax']) |
|
82 | + ->name('delete'); |
|
83 | 83 | |
84 | 84 | // admin::auth.users.restore |
85 | 85 | $this->put('restore', [UsersController::class, 'restore']) |
86 | - ->middleware(['ajax']) |
|
87 | - ->name('restore'); |
|
86 | + ->middleware(['ajax']) |
|
87 | + ->name('restore'); |
|
88 | 88 | |
89 | 89 | if (impersonator()->isEnabled()) { |
90 | 90 | // admin::auth.users.impersonate |
91 | 91 | $this->get('impersonate', [UsersController::class, 'impersonate']) |
92 | - ->name('impersonate'); |
|
92 | + ->name('impersonate'); |
|
93 | 93 | } |
94 | 94 | }); |
95 | 95 | }); |
@@ -24,8 +24,8 @@ |
||
24 | 24 | */ |
25 | 25 | public function map(): void |
26 | 26 | { |
27 | - $this->adminGroup(function () { |
|
28 | - $this->name('settings.')->prefix('settings')->group(function () { |
|
27 | + $this->adminGroup(function() { |
|
28 | + $this->name('settings.')->prefix('settings')->group(function() { |
|
29 | 29 | // admin::auth.settings.index |
30 | 30 | $this->get('/', [SettingsController::class, 'index']) |
31 | 31 | ->name('index'); |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $this->prefix('{'.self::USER_WILDCARD.'}')->group(function () { |
39 | 39 | // admin::auth.roles.administrators.detach |
40 | 40 | $this->delete('detach', [AdministratorsController::class, 'detach']) |
41 | - ->name('detach'); |
|
41 | + ->name('detach'); |
|
42 | 42 | }); |
43 | 43 | }); |
44 | 44 | } |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function map(): void |
36 | 36 | { |
37 | - $this->prefix('administrators')->name('administrators.')->group(function () { |
|
38 | - $this->prefix('{'.self::USER_WILDCARD.'}')->group(function () { |
|
37 | + $this->prefix('administrators')->name('administrators.')->group(function() { |
|
38 | + $this->prefix('{'.self::USER_WILDCARD.'}')->group(function() { |
|
39 | 39 | // admin::auth.roles.administrators.detach |
40 | 40 | $this->delete('detach', [AdministratorsController::class, 'detach']) |
41 | 41 | ->name('detach'); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | */ |
51 | 51 | public function bindings(RolesRepository $repo): void |
52 | 52 | { |
53 | - $this->bind(self::USER_WILDCARD, function (string $uuid, Route $route) use ($repo) { |
|
53 | + $this->bind(self::USER_WILDCARD, function(string $uuid, Route $route) use ($repo) { |
|
54 | 54 | /** @var \Arcanesoft\Foundation\Auth\Models\Role $role */ |
55 | 55 | $role = $route->parameter(RolesRoutes::ROLE_WILDCARD); |
56 | 56 |