Passed
Pull Request — master (#14)
by ARCANEDEV
06:41
created
src/Auth/Models/Concerns/HasRoles.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      */
42 42
     public function getActiveRolesAttribute()
43 43
     {
44
-        return $this->roles->filter(function (Role $role) {
44
+        return $this->roles->filter(function(Role $role) {
45 45
             return $role->isActive();
46 46
         });
47 47
     }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     {
93 93
         $roles = is_array($roles) ? collect($roles) : $roles;
94 94
 
95
-        $failed = $roles->reject(function ($role) {
95
+        $failed = $roles->reject(function($role) {
96 96
             return $this->hasRoleKey($role);
97 97
         })->values();
98 98
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function hasRoleKey(string $key): bool
110 110
     {
111
-        return $this->active_roles->filter(function (Role $role) use ($key) {
111
+        return $this->active_roles->filter(function(Role $role) use ($key) {
112 112
             return $role->hasKey($key);
113 113
         })->isNotEmpty();
114 114
     }
Please login to merge, or discard this patch.
src/Auth/Rules/Users/UniqueKey.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         return ! Auth::makeModel('role')
63 63
             ->newQuery()
64 64
             ->where('key', Auth::slugRoleKey($value))
65
-            ->unless(is_null($this->ignored), function (Builder $query) {
65
+            ->unless(is_null($this->ignored), function(Builder $query) {
66 66
                 return $query->where('id', '!=', $this->ignored);
67 67
             })
68 68
             ->exists();
Please login to merge, or discard this patch.
src/Auth/Http/Routes/ProfileRoutes.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,21 +24,21 @@
 block discarded – undo
24 24
      */
25 25
     public function map(): void
26 26
     {
27
-        $this->adminGroup(function () {
28
-            $this->prefix('profile')->name('profile.')->middleware(['password.confirm'])->group(function () {
27
+        $this->adminGroup(function() {
28
+            $this->prefix('profile')->name('profile.')->middleware(['password.confirm'])->group(function() {
29 29
                 // admin::auth.profile.index
30 30
                 $this->get('/', [ProfileController::class, 'index'])
31 31
                      ->name('index');
32 32
 
33 33
                 // Account
34
-                $this->prefix('account')->name('account.')->group(function () {
34
+                $this->prefix('account')->name('account.')->group(function() {
35 35
                     // admin::auth.profile.account.update
36 36
                     $this->put('update', [ProfileController::class, 'updateAccount'])
37 37
                          ->name('update');
38 38
                 });
39 39
 
40 40
                 // Password
41
-                $this->prefix('password')->name('password.')->group(function () {
41
+                $this->prefix('password')->name('password.')->group(function() {
42 42
                     // admin::auth.profile.password.update
43 43
                     $this->put('update', [ProfileController::class, 'updatePassword'])
44 44
                          ->name('update');
Please login to merge, or discard this patch.
src/Auth/Http/Routes/Permissions/RolesRoutes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function map(): void
37 37
     {
38
-        $this->prefix('roles')->name('roles.')->group(function () {
39
-            $this->prefix('{'.self::ROLE_WILDCARD.'}')->group(function () {
38
+        $this->prefix('roles')->name('roles.')->group(function() {
39
+            $this->prefix('{'.self::ROLE_WILDCARD.'}')->group(function() {
40 40
                 // admin::auth.permissions.roles.detach
41 41
                 $this->delete('detach', [RolesController::class, 'detach'])
42 42
                      ->name('detach');
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function bindings(PermissionsRepository $repo): void
53 53
     {
54
-        $this->bind(self::ROLE_WILDCARD, function (string $uuid, Route $route) use ($repo) {
54
+        $this->bind(self::ROLE_WILDCARD, function(string $uuid, Route $route) use ($repo) {
55 55
             /** @var  \Arcanesoft\Foundation\Auth\Models\Permission  $permission */
56 56
             $permission = $route->parameter(PermissionsRoutes::PERMISSION_WILDCARD);
57 57
 
Please login to merge, or discard this patch.
src/Auth/Http/Routes/PasswordResetsRoutes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,13 +25,13 @@
 block discarded – undo
25 25
      */
26 26
     public function map(): void
27 27
     {
28
-        $this->adminGroup(function () {
29
-            $this->name('password-resets.')->prefix('password-resets')->group(function () {
28
+        $this->adminGroup(function() {
29
+            $this->name('password-resets.')->prefix('password-resets')->group(function() {
30 30
                 // admin::authorization.password-resets.index
31 31
                 $this->get('/', [PasswordResetsController::class, 'index'])
32 32
                      ->name('index');
33 33
 
34
-                $this->dataTableGroup(function () {
34
+                $this->dataTableGroup(function() {
35 35
                     // admin::auth.password-resets.datatables.index
36 36
                     $this->get('/', [PasswordResetsDataTablesController::class, 'index'])
37 37
                         ->name('index');
Please login to merge, or discard this patch.
src/Auth/Http/Routes/UsersRoutes.php 1 patch
Spacing   +5 added lines, -5 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->adminGroup(function () {
37
-            $this->name('users.')->prefix('users')->group(function () {
36
+        $this->adminGroup(function() {
37
+            $this->name('users.')->prefix('users')->group(function() {
38 38
                 // admin::auth.users.index
39 39
                 $this->get('/', [UsersController::class, 'index'])
40 40
                      ->name('index');
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                 $this->post('store', [UsersController::class, 'store'])
58 58
                      ->name('store');
59 59
 
60
-                $this->prefix('{'.static::USER_WILDCARD.'}')->group(function () {
60
+                $this->prefix('{'.static::USER_WILDCARD.'}')->group(function() {
61 61
                     // admin::auth.users.show
62 62
                     $this->get('/', [UsersController::class, 'show'])
63 63
                          ->name('show');
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     protected function mapDataTablesRoutes(): void
102 102
     {
103
-        $this->dataTableGroup(function () {
103
+        $this->dataTableGroup(function() {
104 104
             // admin::auth.users.datatables.index
105 105
             $this->get('/', [UsersDataTablesController::class, 'index'])
106 106
                  ->name('index');
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     public function bindings(UsersRepository $repo): void
120 120
     {
121
-        $this->bind(static::USER_WILDCARD, function (string $uuid) use ($repo) {
121
+        $this->bind(static::USER_WILDCARD, function(string $uuid) use ($repo) {
122 122
             return $repo->firstWhereUuidOrFail($uuid);
123 123
         });
124 124
     }
Please login to merge, or discard this patch.
src/Auth/Http/Routes/DashboardRoutes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      */
25 25
     public function map(): void
26 26
     {
27
-        $this->adminGroup(function () {
27
+        $this->adminGroup(function() {
28 28
             // admin::authorization.index
29 29
             $this->get('/', [DashboardController::class, 'index'])
30 30
                  ->name('index');
Please login to merge, or discard this patch.
src/Auth/Http/Routes/PermissionsRoutes.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,20 +33,20 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function map(): void
35 35
     {
36
-        $this->adminGroup(function () {
37
-            $this->prefix('permissions')->name('permissions.')->group(function () {
36
+        $this->adminGroup(function() {
37
+            $this->prefix('permissions')->name('permissions.')->group(function() {
38 38
                 // admin::auth.permissions.index
39 39
                 $this->get('/', [PermissionsController::class, 'index'])
40 40
                      ->name('index');
41 41
 
42 42
                 $this->mapDataTableRoutes();
43 43
 
44
-                $this->prefix('{'.self::PERMISSION_WILDCARD.'}')->group(function () {
44
+                $this->prefix('{'.self::PERMISSION_WILDCARD.'}')->group(function() {
45 45
                     // admin::auth.permissions.show
46 46
                     $this->get('/', [PermissionsController::class, 'show'])
47 47
                          ->name('show');
48 48
 
49
-                    $this->namespace('Permissions')->group(function () {
49
+                    $this->namespace('Permissions')->group(function() {
50 50
                         static::mapRouteClasses([
51 51
                             Permissions\RolesRoutes::class,
52 52
                         ]);
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     protected function mapDataTableRoutes(): void
63 63
     {
64
-        $this->dataTableGroup(function () {
64
+        $this->dataTableGroup(function() {
65 65
             // admin::auth.permissions.datatables.index
66 66
             $this->get('/', [PermissionsDataTableController::class, 'index'])
67 67
                  ->name('index');
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function bindings(PermissionsRepository $repo): void
75 75
     {
76
-        $this->bind(self::PERMISSION_WILDCARD, function (string $uuid) use ($repo) {
76
+        $this->bind(self::PERMISSION_WILDCARD, function(string $uuid) use ($repo) {
77 77
             return $repo->firstOrFailWhereUuid($uuid);
78 78
         });
79 79
 
Please login to merge, or discard this patch.
src/Auth/Http/Routes/Roles/UsersRoutes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function map(): void
36 36
     {
37
-        $this->prefix('users')->name('users.')->group(function () {
38
-            $this->prefix('{'.self::USER_WILDCARD.'}')->group(function () {
37
+        $this->prefix('users')->name('users.')->group(function() {
38
+            $this->prefix('{'.self::USER_WILDCARD.'}')->group(function() {
39 39
                 // admin::auth.roles.users.detach
40 40
                 $this->delete('detach', [UsersController::class, 'detach'])
41 41
                      ->name('detach');
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
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
 
Please login to merge, or discard this patch.