Passed
Pull Request — master (#14)
by ARCANEDEV
05:42
created
src/Authorization/Http/Routes/Web/UsersRoutes.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -34,62 +34,62 @@
 block discarded – undo
34 34
         $this->name('users.')->prefix('users')->group(function () {
35 35
             // admin::authorization.users.index
36 36
             $this->get('/', [UsersController::class, 'index'])
37
-                 ->name('index');
37
+                    ->name('index');
38 38
 
39 39
             // admin::authorization.users.datatable
40 40
             $this->post('datatable', [UsersController::class, 'datatable'])
41
-                 ->middleware(['ajax'])
42
-                 ->name('datatable');
41
+                    ->middleware(['ajax'])
42
+                    ->name('datatable');
43 43
 
44 44
             // admin::authorization.users.metrics
45 45
             $this->get('metrics', [UsersController::class, 'metrics'])
46
-                 ->name('metrics');
46
+                    ->name('metrics');
47 47
 
48 48
             // admin::authorization.users.create
49 49
             $this->get('create', [UsersController::class, 'create'])
50
-                 ->name('create');
50
+                    ->name('create');
51 51
 
52 52
             // admin::authorization.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::authorization.users.show
58 58
                 $this->get('/', [UsersController::class, 'show'])
59
-                     ->name('show');
59
+                        ->name('show');
60 60
 
61 61
                 // admin::authorization.users.edit
62 62
                 $this->get('edit', [UsersController::class, 'edit'])
63
-                     ->name('edit');
63
+                        ->name('edit');
64 64
 
65 65
                 // admin::authorization.users.update
66 66
                 $this->put('update', [UsersController::class, 'update'])
67
-                     ->name('update');
67
+                        ->name('update');
68 68
 
69 69
                 // admin::authorization.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::authorization.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::authorization.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::authorization.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::authorization.users.impersonate
91 91
                     $this->get('impersonate', [UsersController::class, 'impersonate'])
92
-                         ->name('impersonate');
92
+                            ->name('impersonate');
93 93
                 }
94 94
             });
95 95
         });
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function map(): void
33 33
     {
34
-        $this->name('users.')->prefix('users')->group(function () {
34
+        $this->name('users.')->prefix('users')->group(function() {
35 35
             // admin::authorization.users.index
36 36
             $this->get('/', [UsersController::class, 'index'])
37 37
                  ->name('index');
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             $this->post('store', [UsersController::class, 'store'])
54 54
                  ->name('store');
55 55
 
56
-            $this->prefix('{'.static::USER_WILDCARD.'}')->group(function () {
56
+            $this->prefix('{'.static::USER_WILDCARD.'}')->group(function() {
57 57
                 // admin::authorization.users.show
58 58
                 $this->get('/', [UsersController::class, 'show'])
59 59
                      ->name('show');
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function bindings(UsersRepository $repo): void
104 104
     {
105
-        $this->bind(static::USER_WILDCARD, function (string $uuid) use ($repo) {
105
+        $this->bind(static::USER_WILDCARD, function(string $uuid) use ($repo) {
106 106
             return $repo->firstWhereUuidOrFail($uuid);
107 107
         });
108 108
     }
Please login to merge, or discard this patch.
src/Authorization/Http/Routes/Web/PermissionsRoutes.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,17 +34,17 @@
 block discarded – undo
34 34
         $this->prefix('permissions')->name('permissions.')->group(function () {
35 35
             // admin::authorization.permissions.index
36 36
             $this->get('/', [PermissionsController::class, 'index'])
37
-                 ->name('index');
37
+                    ->name('index');
38 38
 
39 39
             // admin::authorization.permissions.datatable
40 40
             $this->post('datatable', [PermissionsController::class, 'datatable'])
41
-                 ->middleware(['ajax'])
42
-                 ->name('datatable');
41
+                    ->middleware(['ajax'])
42
+                    ->name('datatable');
43 43
 
44 44
             $this->prefix('{'.static::PERMISSION_WILDCARD.'}')->group(function () {
45 45
                 // admin::authorization.permissions.show
46 46
                 $this->get('/', [PermissionsController::class, 'show'])
47
-                     ->name('show');
47
+                        ->name('show');
48 48
 
49 49
                 static::mapRouteClasses([
50 50
                     Permissions\RolesRoutes::class,
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function map(): void
33 33
     {
34
-        $this->prefix('permissions')->name('permissions.')->group(function () {
34
+        $this->prefix('permissions')->name('permissions.')->group(function() {
35 35
             // admin::authorization.permissions.index
36 36
             $this->get('/', [PermissionsController::class, 'index'])
37 37
                  ->name('index');
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
                  ->middleware(['ajax'])
42 42
                  ->name('datatable');
43 43
 
44
-            $this->prefix('{'.static::PERMISSION_WILDCARD.'}')->group(function () {
44
+            $this->prefix('{'.static::PERMISSION_WILDCARD.'}')->group(function() {
45 45
                 // admin::authorization.permissions.show
46 46
                 $this->get('/', [PermissionsController::class, 'show'])
47 47
                      ->name('show');
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function bindings(PermissionsRepository $repo): void
62 62
     {
63
-        $this->bind(static::PERMISSION_WILDCARD, function (string $uuid) use ($repo) {
63
+        $this->bind(static::PERMISSION_WILDCARD, function(string $uuid) use ($repo) {
64 64
             return $repo->firstOrFailWhereUuid($uuid);
65 65
         });
66 66
 
Please login to merge, or discard this patch.
src/Authorization/Http/Routes/Web/RolesRoutes.php 2 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -34,52 +34,52 @@
 block discarded – undo
34 34
         $this->name('roles.')->prefix('roles')->group(function () {
35 35
             // admin::authorization.roles.index
36 36
             $this->get('/', [RolesController::class, 'index'])
37
-                 ->name('index');
37
+                    ->name('index');
38 38
 
39 39
             // admin::authorization.roles.datatable
40 40
             $this->post('datatable', [RolesController::class, 'datatable'])
41
-                 ->middleware(['ajax'])
42
-                 ->name('datatable');
41
+                    ->middleware(['ajax'])
42
+                    ->name('datatable');
43 43
 
44 44
             // admin::authorization.roles.metrics
45 45
             $this->get('metrics', [RolesController::class, 'metrics'])
46
-                 ->name('metrics');
46
+                    ->name('metrics');
47 47
 
48 48
             // admin::authorization.roles.create
49 49
             $this->get('create', [RolesController::class, 'create'])
50
-                 ->name('create');
50
+                    ->name('create');
51 51
 
52 52
             // admin::authorization.roles.store
53 53
             $this->post('store', [RolesController::class, 'store'])
54
-                 ->name('store');
54
+                    ->name('store');
55 55
 
56 56
             $this->prefix('{'.static::ROLE_WILDCARD.'}')->group(function () {
57 57
                 // admin::authorization.roles.show
58 58
                 $this->get('/', [RolesController::class, 'show'])
59
-                     ->name('show');
59
+                        ->name('show');
60 60
 
61 61
                 // admin::authorization.roles.edit
62 62
                 $this->get('edit', [RolesController::class, 'edit'])
63
-                     ->name('edit');
63
+                        ->name('edit');
64 64
 
65 65
                 // admin::authorization.roles.update
66 66
                 $this->put('update', [RolesController::class, 'update'])
67
-                     ->name('update');
67
+                        ->name('update');
68 68
 
69 69
                 // admin::authorization.roles.activate
70 70
                 $this->put('activate', [RolesController::class, 'activate'])
71
-                     ->middleware(['ajax'])
72
-                     ->name('activate');
71
+                        ->middleware(['ajax'])
72
+                        ->name('activate');
73 73
 
74 74
                 // admin::authorization.roles.deactivate
75 75
                 $this->put('deactivate', [RolesController::class, 'deactivate'])
76
-                     ->middleware(['ajax'])
77
-                     ->name('deactivate');
76
+                        ->middleware(['ajax'])
77
+                        ->name('deactivate');
78 78
 
79 79
                 // admin::authorization.roles.delete
80 80
                 $this->delete('delete', [RolesController::class, 'delete'])
81
-                     ->middleware(['ajax'])
82
-                     ->name('delete');
81
+                        ->middleware(['ajax'])
82
+                        ->name('delete');
83 83
 
84 84
                 $this->namespace('Roles')->group(function () {
85 85
                     static::mapRouteClasses([
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function map(): void
33 33
     {
34
-        $this->name('roles.')->prefix('roles')->group(function () {
34
+        $this->name('roles.')->prefix('roles')->group(function() {
35 35
             // admin::authorization.roles.index
36 36
             $this->get('/', [RolesController::class, 'index'])
37 37
                  ->name('index');
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             $this->post('store', [RolesController::class, 'store'])
54 54
                  ->name('store');
55 55
 
56
-            $this->prefix('{'.static::ROLE_WILDCARD.'}')->group(function () {
56
+            $this->prefix('{'.static::ROLE_WILDCARD.'}')->group(function() {
57 57
                 // admin::authorization.roles.show
58 58
                 $this->get('/', [RolesController::class, 'show'])
59 59
                      ->name('show');
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                      ->middleware(['ajax'])
82 82
                      ->name('delete');
83 83
 
84
-                $this->namespace('Roles')->group(function () {
84
+                $this->namespace('Roles')->group(function() {
85 85
                     static::mapRouteClasses([
86 86
                         Roles\AdministratorsRoutes::class,
87 87
                         Roles\PermissionsRoutes::class,
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function bindings(RolesRepository $repo): void
100 100
     {
101
-        $this->bind(static::ROLE_WILDCARD, function (string $uuid) use ($repo) {
101
+        $this->bind(static::ROLE_WILDCARD, function(string $uuid) use ($repo) {
102 102
             return $repo->firstWithUuidOrFail($uuid);
103 103
         });
104 104
 
Please login to merge, or discard this patch.
src/Authorization/Http/Routes/Web/Permissions/RolesRoutes.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
             $this->prefix('{'.static::ROLE_WILDCARD.'}')->group(function () {
38 38
                 // admin::authorization.permissions.roles.detach
39 39
                 $this->delete('detach', [RolesController::class, 'detach'])
40
-                     ->name('detach');
40
+                        ->name('detach');
41 41
             });
42 42
         });
43 43
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function map(): void
35 35
     {
36
-        $this->prefix('roles')->name('roles.')->group(function () {
37
-            $this->prefix('{'.static::ROLE_WILDCARD.'}')->group(function () {
36
+        $this->prefix('roles')->name('roles.')->group(function() {
37
+            $this->prefix('{'.static::ROLE_WILDCARD.'}')->group(function() {
38 38
                 // admin::authorization.permissions.roles.detach
39 39
                 $this->delete('detach', [RolesController::class, 'detach'])
40 40
                      ->name('detach');
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function bindings(PermissionsRepository $repo): void
51 51
     {
52
-        $this->bind(static::ROLE_WILDCARD, function (string $uuid, Route $route) use ($repo) {
52
+        $this->bind(static::ROLE_WILDCARD, function(string $uuid, Route $route) use ($repo) {
53 53
             /** @var  \Arcanesoft\Foundation\Authorization\Models\Permission  $permission */
54 54
             $permission = $route->parameter(PermissionsRoutes::PERMISSION_WILDCARD);
55 55
 
Please login to merge, or discard this patch.
src/Authorization/Http/Routes/Web/AdministratorsRoutes.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -34,57 +34,57 @@
 block discarded – undo
34 34
         $this->name('administrators.')->prefix('administrators')->group(function () {
35 35
             // admin::authorization.administrators.index
36 36
             $this->get('/', [AdministratorsController::class, 'index'])
37
-                 ->name('index');
37
+                    ->name('index');
38 38
 
39 39
             // admin::authorization.administrators.datatable
40 40
             $this->post('datatable', [AdministratorsController::class, 'datatable'])
41
-                 ->middleware(['ajax'])
42
-                 ->name('datatable');
41
+                    ->middleware(['ajax'])
42
+                    ->name('datatable');
43 43
 
44 44
             // admin::authorization.administrators.metrics
45 45
             $this->get('metrics', [AdministratorsController::class, 'metrics'])
46
-                 ->name('metrics');
46
+                    ->name('metrics');
47 47
 
48 48
             // admin::authorization.administrators.create
49 49
             $this->get('create', [AdministratorsController::class, 'create'])
50
-                 ->name('create');
50
+                    ->name('create');
51 51
 
52 52
             // admin::authorization.administrators.post
53 53
             $this->post('store', [AdministratorsController::class, 'store'])
54
-                 ->name('store');
54
+                    ->name('store');
55 55
 
56 56
             $this->prefix('{'.static::WILDCARD_ADMIN.'}')->group(function () {
57 57
                 // admin::authorization.administrators.show
58 58
                 $this->get('/', [AdministratorsController::class, 'show'])
59
-                     ->name('show');
59
+                        ->name('show');
60 60
 
61 61
                 // admin::authorization.administrators.edit
62 62
                 $this->get('edit', [AdministratorsController::class, 'edit'])
63
-                     ->name('edit');
63
+                        ->name('edit');
64 64
 
65 65
                 // admin::authorization.administrators.update
66 66
                 $this->put('update', [AdministratorsController::class, 'update'])
67
-                     ->name('update');
67
+                        ->name('update');
68 68
 
69 69
                 // admin::authorization.administrators.activate
70 70
                 $this->put('activate', [AdministratorsController::class, 'activate'])
71
-                     ->middleware(['ajax'])
72
-                     ->name('activate');
71
+                        ->middleware(['ajax'])
72
+                        ->name('activate');
73 73
 
74 74
                 // admin::authorization.administrators.deactivate
75 75
                 $this->put('deactivate', [AdministratorsController::class, 'deactivate'])
76
-                     ->middleware(['ajax'])
77
-                     ->name('deactivate');
76
+                        ->middleware(['ajax'])
77
+                        ->name('deactivate');
78 78
 
79 79
                 // admin::authorization.administrators.delete
80 80
                 $this->delete('delete', [AdministratorsController::class, 'delete'])
81
-                     ->middleware(['ajax'])
82
-                     ->name('delete');
81
+                        ->middleware(['ajax'])
82
+                        ->name('delete');
83 83
 
84 84
                 // admin::authorization.administrators.restore
85 85
                 $this->put('restore', [AdministratorsController::class, 'restore'])
86
-                     ->middleware(['ajax'])
87
-                     ->name('restore');
86
+                        ->middleware(['ajax'])
87
+                        ->name('restore');
88 88
 
89 89
                 static::mapRouteClasses([
90 90
                     Administrators\SessionsRoutes::class
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function map(): void
33 33
     {
34
-        $this->name('administrators.')->prefix('administrators')->group(function () {
34
+        $this->name('administrators.')->prefix('administrators')->group(function() {
35 35
             // admin::authorization.administrators.index
36 36
             $this->get('/', [AdministratorsController::class, 'index'])
37 37
                  ->name('index');
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             $this->post('store', [AdministratorsController::class, 'store'])
54 54
                  ->name('store');
55 55
 
56
-            $this->prefix('{'.static::WILDCARD_ADMIN.'}')->group(function () {
56
+            $this->prefix('{'.static::WILDCARD_ADMIN.'}')->group(function() {
57 57
                 // admin::authorization.administrators.show
58 58
                 $this->get('/', [AdministratorsController::class, 'show'])
59 59
                      ->name('show');
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function bindings(AdministratorsRepository $repo): void
102 102
     {
103
-        $this->bind(static::WILDCARD_ADMIN, function (string $uuid) use ($repo) {
103
+        $this->bind(static::WILDCARD_ADMIN, function(string $uuid) use ($repo) {
104 104
             return $repo->firstWhereUuidOrFail($uuid);
105 105
         });
106 106
 
Please login to merge, or discard this patch.
src/Authorization/Http/Datatables/UsersDatatable.php 2 patches
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     {
62 62
         $search = $this->searchQuery($request);
63 63
 
64
-        return $query->unless(empty($search), function (Builder $q) use ($search) {
64
+        return $query->unless(empty($search), function(Builder $q) use ($search) {
65 65
             $q->where('first_name', 'like', '%'.$search.'%')
66 66
                 ->orWhere('last_name', 'like', '%'.$search.'%')
67 67
                 ->orWhere('email', 'like', '%'.$search.'%');
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             Column::make('last_name', 'Last Name')->sortable(),
82 82
             Column::make('email', 'Email')->sortable(Column::SORT_ASC),
83 83
             Column::make('created_at', 'Created at')->sortable()->align('center'),
84
-            Column::make('status', 'Status', Column::DATATYPE_BADGE_ACTIVE)->sortable(null, function (Builder $query, Column $column): Builder {
84
+            Column::make('status', 'Status', Column::DATATYPE_BADGE_ACTIVE)->sortable(null, function(Builder $query, Column $column): Builder {
85 85
                 return $query->orderBy('activated_at', $column->getSortDirection());
86 86
             })->align('center')->escaped(false),
87 87
         ];
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             Filter::select('display', 'Display', 'list', [
109 109
                 'list'         => 'List',
110 110
                 'only-trashed' => 'Only trashed',
111
-            ])->query(function (Builder $query, $value): Builder {
111
+            ])->query(function(Builder $query, $value): Builder {
112 112
                 return $query->onlyTrashed($value === 'only-trashed');
113 113
             }),
114 114
         ];
@@ -126,44 +126,44 @@  discard block
 block discarded – undo
126 126
     {
127 127
         $actions = [];
128 128
 
129
-        $actions[] = Action::link('show', 'Show', function () use ($user) {
129
+        $actions[] = Action::link('show', 'Show', function() use ($user) {
130 130
             return route('admin::authorization.users.show', [$user]);
131
-        })->can(function () use ($user) {
131
+        })->can(function() use ($user) {
132 132
             return UsersPolicy::can('show', [$user]);
133 133
         })->asIcon();
134 134
 
135
-        $actions[] = Action::link('edit', 'Edit', function () use ($user) {
135
+        $actions[] = Action::link('edit', 'Edit', function() use ($user) {
136 136
             return route('admin::authorization.users.edit', [$user]);
137
-        })->can(function () use ($user) {
137
+        })->can(function() use ($user) {
138 138
             return UsersPolicy::can('update', [$user]);
139 139
         })->asIcon();
140 140
 
141 141
         if ($user->isActive()) {
142
-            $actions[] = Action::button('deactivate', 'Deactivate', function () use ($user) {
142
+            $actions[] = Action::button('deactivate', 'Deactivate', function() use ($user) {
143 143
                 return "ARCANESOFT.emit('authorization::users.deactivate', {id: '{$user->getRouteKey()}'})";
144
-            })->can(function () use ($user) {
144
+            })->can(function() use ($user) {
145 145
                 return UsersPolicy::can('deactivate', [$user]);
146 146
             })->asIcon();
147 147
         }
148 148
         else {
149
-            $actions[] = Action::button('activate', 'Activate', function () use ($user) {
149
+            $actions[] = Action::button('activate', 'Activate', function() use ($user) {
150 150
                 return "ARCANESOFT.emit('authorization::users.activate', {id: '{$user->getRouteKey()}'})";
151
-            })->can(function () use ($user) {
151
+            })->can(function() use ($user) {
152 152
                 return UsersPolicy::can('activate', [$user]);
153 153
             })->asIcon();
154 154
         }
155 155
 
156 156
         if ($user->trashed()) {
157
-            $actions[] = Action::button('restore', 'Restore', function () use ($user) {
157
+            $actions[] = Action::button('restore', 'Restore', function() use ($user) {
158 158
                 return "ARCANESOFT.emit('authorization::users.restore', {id: '{$user->getRouteKey()}'})";
159
-            })->can(function () use ($user) {
159
+            })->can(function() use ($user) {
160 160
                 return UsersPolicy::can('restore', [$user]);
161 161
             })->asIcon();
162 162
         }
163 163
 
164
-        $actions[] = Action::button('delete', 'Delete', function () use ($user) {
164
+        $actions[] = Action::button('delete', 'Delete', function() use ($user) {
165 165
             return "ARCANESOFT.emit('authorization::users.delete', {id: '{$user->getRouteKey()}'})";
166
-        })->can(function () use ($user) {
166
+        })->can(function() use ($user) {
167 167
             return UsersPolicy::can('delete', [$user]);
168 168
         })->asIcon();
169 169
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -144,8 +144,7 @@
 block discarded – undo
144 144
             })->can(function () use ($user) {
145 145
                 return UsersPolicy::can('deactivate', [$user]);
146 146
             })->asIcon();
147
-        }
148
-        else {
147
+        } else {
149 148
             $actions[] = Action::button('activate', 'Activate', function () use ($user) {
150 149
                 return "ARCANESOFT.emit('authorization::users.activate', {id: '{$user->getRouteKey()}'})";
151 150
             })->can(function () use ($user) {
Please login to merge, or discard this patch.
src/Authorization/Http/Datatables/AdministratorDatatable.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@
 block discarded – undo
63 63
 
64 64
         return $query->unless(empty($search), function (Builder $q) use ($search): Builder {
65 65
             return $q->where('first_name', 'like', '%'.$search.'%')
66
-              ->orWhere('last_name', 'like', '%'.$search.'%')
67
-              ->orWhere('email', 'like', '%'.$search.'%');
66
+                ->orWhere('last_name', 'like', '%'.$search.'%')
67
+                ->orWhere('email', 'like', '%'.$search.'%');
68 68
         });
69 69
     }
70 70
 
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     {
62 62
         $search = $this->searchQuery($request);
63 63
 
64
-        return $query->unless(empty($search), function (Builder $q) use ($search): Builder {
64
+        return $query->unless(empty($search), function(Builder $q) use ($search): Builder {
65 65
             return $q->where('first_name', 'like', '%'.$search.'%')
66 66
               ->orWhere('last_name', 'like', '%'.$search.'%')
67 67
               ->orWhere('email', 'like', '%'.$search.'%');
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             Column::make('last_name', 'Last Name')->sortable(),
81 81
             Column::make('email', 'Email')->sortable(),
82 82
             Column::make('created_at', 'Created at')->sortable()->align('center'),
83
-            Column::make('status', 'Status', Column::DATATYPE_BADGE_ACTIVE)->sortable(null, function (Builder $query, Column $column): Builder {
83
+            Column::make('status', 'Status', Column::DATATYPE_BADGE_ACTIVE)->sortable(null, function(Builder $query, Column $column): Builder {
84 84
                 return $query->orderBy('activated_at', $column->getSortDirection());
85 85
             })->align('center')->escaped(false),
86 86
         ];
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             Filter::select('display', 'Display', 'list', [
108 108
                 'list'         => 'List',
109 109
                 'only-trashed' => 'Only trashed',
110
-            ])->query(function (Builder $query, $value): Builder {
110
+            ])->query(function(Builder $query, $value): Builder {
111 111
                 return $query->onlyTrashed($value === 'only-trashed');
112 112
             }),
113 113
         ];
@@ -125,44 +125,44 @@  discard block
 block discarded – undo
125 125
     {
126 126
         $actions = [];
127 127
 
128
-        $actions[] = Action::link('show', 'Show', function () use ($administrator) {
128
+        $actions[] = Action::link('show', 'Show', function() use ($administrator) {
129 129
             return route('admin::authorization.administrators.show', [$administrator]);
130
-        })->can(function () use ($administrator) {
130
+        })->can(function() use ($administrator) {
131 131
             return AdministratorsPolicy::can('show', [$administrator]);
132 132
         })->asIcon();
133 133
 
134
-        $actions[] = Action::link('edit', 'Edit', function () use ($administrator) {
134
+        $actions[] = Action::link('edit', 'Edit', function() use ($administrator) {
135 135
             return route('admin::authorization.administrators.edit', [$administrator]);
136
-        })->can(function () use ($administrator) {
136
+        })->can(function() use ($administrator) {
137 137
             return AdministratorsPolicy::can('update', [$administrator]);
138 138
         })->asIcon();
139 139
 
140 140
         if ($administrator->isActive()) {
141
-            $actions[] = Action::button('deactivate', 'Deactivate', function () use ($administrator) {
141
+            $actions[] = Action::button('deactivate', 'Deactivate', function() use ($administrator) {
142 142
                 return "ARCANESOFT.emit('authorization::administrators.deactivate', {id: '{$administrator->getRouteKey()}'})";
143
-            })->can(function () use ($administrator) {
143
+            })->can(function() use ($administrator) {
144 144
                 return AdministratorsPolicy::can('deactivate', [$administrator]);
145 145
             })->asIcon();
146 146
         }
147 147
         else {
148
-            $actions[] = Action::button('activate', 'Activate', function () use ($administrator) {
148
+            $actions[] = Action::button('activate', 'Activate', function() use ($administrator) {
149 149
                 return "ARCANESOFT.emit('authorization::administrators.activate', {id: '{$administrator->getRouteKey()}'})";
150
-            })->can(function () use ($administrator) {
150
+            })->can(function() use ($administrator) {
151 151
                 return AdministratorsPolicy::can('activate', [$administrator]);
152 152
             })->asIcon();
153 153
         }
154 154
 
155 155
         if ($administrator->trashed()) {
156
-            $actions[] = Action::button('restore', 'Restore', function () use ($administrator) {
156
+            $actions[] = Action::button('restore', 'Restore', function() use ($administrator) {
157 157
                 return "ARCANESOFT.emit('authorization::administrators.restore', {id: '{$administrator->getRouteKey()}'})";
158
-            })->can(function () use ($administrator) {
158
+            })->can(function() use ($administrator) {
159 159
                 return AdministratorsPolicy::can('restore', [$administrator]);
160 160
             })->asIcon();
161 161
         }
162 162
 
163
-        $actions[] = Action::button('delete', 'Delete', function () use ($administrator) {
163
+        $actions[] = Action::button('delete', 'Delete', function() use ($administrator) {
164 164
             return "ARCANESOFT.emit('authorization::administrators.delete', {id: '{$administrator->getRouteKey()}'})";
165
-        })->can(function () use ($administrator) {
165
+        })->can(function() use ($administrator) {
166 166
             return AdministratorsPolicy::can('delete', [$administrator]);
167 167
         })->asIcon();
168 168
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -143,8 +143,7 @@
 block discarded – undo
143 143
             })->can(function () use ($administrator) {
144 144
                 return AdministratorsPolicy::can('deactivate', [$administrator]);
145 145
             })->asIcon();
146
-        }
147
-        else {
146
+        } else {
148 147
             $actions[] = Action::button('activate', 'Activate', function () use ($administrator) {
149 148
                 return "ARCANESOFT.emit('authorization::administrators.activate', {id: '{$administrator->getRouteKey()}'})";
150 149
             })->can(function () use ($administrator) {
Please login to merge, or discard this patch.
src/Authorization/Http/Datatables/PasswordResetsDatatable.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     {
62 62
         $search = $this->searchQuery($request);
63 63
 
64
-        return $query->unless(empty($search), function (Builder $q) use ($search) {
64
+        return $query->unless(empty($search), function(Builder $q) use ($search) {
65 65
             $q->where('email', 'like', '%'.$search.'%');
66 66
         });
67 67
     }
@@ -91,36 +91,36 @@  discard block
 block discarded – undo
91 91
     {
92 92
         $actions = [];
93 93
 
94
-        $actions[] = Action::link('show', 'Show', function () use ($role) {
94
+        $actions[] = Action::link('show', 'Show', function() use ($role) {
95 95
             return route('admin::authorization.roles.show', [$role]);
96
-        })->can(function () use ($role) {
96
+        })->can(function() use ($role) {
97 97
             return PasswordResetsPolicy::can('show', [$role]);
98 98
         })->asIcon();
99 99
 
100
-        $actions[] = Action::link('edit', 'Edit', function () use ($role) {
100
+        $actions[] = Action::link('edit', 'Edit', function() use ($role) {
101 101
             return route('admin::authorization.roles.edit', [$role]);
102
-        })->can(function () use ($role) {
102
+        })->can(function() use ($role) {
103 103
             return PasswordResetsPolicy::can('update', [$role]);
104 104
         })->asIcon();
105 105
 
106 106
         if ($role->isActive()) {
107
-            $actions[] = Action::button('deactivate', 'Deactivate', function () use ($role) {
107
+            $actions[] = Action::button('deactivate', 'Deactivate', function() use ($role) {
108 108
                 return "ARCANESOFT.emit('authorization::roles.deactivate', {id: '{$role->getRouteKey()}'})";
109
-            })->can(function () use ($role) {
109
+            })->can(function() use ($role) {
110 110
                 return PasswordResetsPolicy::can('deactivate', [$role]);
111 111
             })->asIcon();
112 112
         }
113 113
         else {
114
-            $actions[] = Action::button('activate', 'Activate', function () use ($role) {
114
+            $actions[] = Action::button('activate', 'Activate', function() use ($role) {
115 115
                 return "ARCANESOFT.emit('authorization::roles.activate', {id: '{$role->getRouteKey()}'})";
116
-            })->can(function () use ($role) {
116
+            })->can(function() use ($role) {
117 117
                 return PasswordResetsPolicy::can('activate', [$role]);
118 118
             })->asIcon();
119 119
         }
120 120
 
121
-        $actions[] = Action::button('delete', 'Delete', function () use ($role) {
121
+        $actions[] = Action::button('delete', 'Delete', function() use ($role) {
122 122
             return "ARCANESOFT.emit('authorization::roles.delete', {id: '{$role->getRouteKey()}'})";
123
-        })->can(function () use ($role) {
123
+        })->can(function() use ($role) {
124 124
             return PasswordResetsPolicy::can('delete', [$role]);
125 125
         })->asIcon();
126 126
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,8 +109,7 @@
 block discarded – undo
109 109
             })->can(function () use ($role) {
110 110
                 return PasswordResetsPolicy::can('deactivate', [$role]);
111 111
             })->asIcon();
112
-        }
113
-        else {
112
+        } else {
114 113
             $actions[] = Action::button('activate', 'Activate', function () use ($role) {
115 114
                 return "ARCANESOFT.emit('authorization::roles.activate', {id: '{$role->getRouteKey()}'})";
116 115
             })->can(function () use ($role) {
Please login to merge, or discard this patch.
src/Authorization/Http/Datatables/PermissionsDatatable.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     {
70 70
         $search = $this->searchQuery($request);
71 71
 
72
-        return $query->unless(empty($search), function (Builder $q) use ($search): Builder {
72
+        return $query->unless(empty($search), function(Builder $q) use ($search): Builder {
73 73
             $permissionTable = Auth::table('permissions');
74 74
             $groupsTable     = Auth::table('permissions-groups');
75 75
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     protected function columns(): array
90 90
     {
91 91
         return [
92
-            Column::make('group', 'Group')->sortable(Column::SORT_ASC, function (Builder $query, Column $column): Builder {
92
+            Column::make('group', 'Group')->sortable(Column::SORT_ASC, function(Builder $query, Column $column): Builder {
93 93
                 $groupsTable = Auth::table('permissions-groups');
94 94
 
95 95
                 return $query->orderBy("{$groupsTable}.name", $column->getSortDirection());
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
     protected function actions(Request $request, $permission): array
125 125
     {
126 126
         return [
127
-            Action::link('show', 'Show', function () use ($permission) {
127
+            Action::link('show', 'Show', function() use ($permission) {
128 128
                 return route('admin::authorization.permissions.show', [$permission]);
129
-            })->can(function () use ($permission) {
129
+            })->can(function() use ($permission) {
130 130
                 return PermissionsPolicy::can('show', [$permission]);
131 131
             })->asIcon()
132 132
         ];
Please login to merge, or discard this patch.