Passed
Pull Request — master (#14)
by ARCANEDEV
05:47
created
src/Authorization/Repositories/RolesRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      */
142 142
     public function createOne(array $attributes): Role
143 143
     {
144
-        return tap($this->create($attributes), function (Role $role) use ($attributes) {
144
+        return tap($this->create($attributes), function(Role $role) use ($attributes) {
145 145
             $this->syncPermissionsByUuids($role, $attributes['permissions'] ?: []);
146 146
         });
147 147
     }
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
         if ($admin->isSuperAdmin())
311 311
             return $roles;
312 312
 
313
-        return $roles->reject(function (Role $role) {
313
+        return $roles->reject(function(Role $role) {
314 314
             return $role->isAdministrator();
315 315
         });
316 316
     }
Please login to merge, or discard this patch.
src/Authorization/Repositories/PermissionsGroupsRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
      */
60 60
     public function createOneWithPermissions(array $attributes, iterable $permissions)
61 61
     {
62
-        return tap($this->createOne($attributes), function (PermissionsGroup $group) use ($permissions) {
62
+        return tap($this->createOne($attributes), function(PermissionsGroup $group) use ($permissions) {
63 63
             $group->permissions()->saveMany($permissions);
64 64
         });
65 65
     }
Please login to merge, or discard this patch.
src/Authorization/Repositories/AdministratorsRepository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     public function onlyTrashed(bool $condition = true)
78 78
     {
79
-        return $this->when($condition, function (Builder $q) {
79
+        return $this->when($condition, function(Builder $q) {
80 80
             return $q->onlyTrashed();
81 81
         });
82 82
     }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     {
113 113
         $attributes['password'] = $attributes['password'] ?? Str::random(8);
114 114
 
115
-        return tap($this->model()->fill($attributes), function (Administrator $administrator) use ($attributes) {
115
+        return tap($this->model()->fill($attributes), function(Administrator $administrator) use ($attributes) {
116 116
             $administrator->forceFill([
117 117
                 'activated_at' => $attributes['activated_at'] ?? now(), // TODO: Add a setting to change this
118 118
             ]);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     {
133 133
         $roles = $attributes['roles'];
134 134
 
135
-        return tap($this->createOne($attributes), function ($administrator) use ($roles) {
135
+        return tap($this->createOne($attributes), function($administrator) use ($roles) {
136 136
             $this->syncRolesByUuids($administrator, $roles);
137 137
         });
138 138
     }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
     {
166 166
         $roles = $attributes['roles'];
167 167
 
168
-        return tap($this->updateOne($administrator, $attributes), function () use ($administrator, $roles) {
168
+        return tap($this->updateOne($administrator, $attributes), function() use ($administrator, $roles) {
169 169
             $this->syncRolesByUuids($administrator, $roles);
170 170
         });
171 171
     }
Please login to merge, or discard this patch.
src/Authorization/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/Authorization/Socialite.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     {
33 33
         $providers = Auth::config('authentication.socialite.providers', []);
34 34
 
35
-        return Collection::make($providers)->transform(function (array $provider, string $key) {
35
+        return Collection::make($providers)->transform(function(array $provider, string $key) {
36 36
             return new SocialiteProvider(array_merge($provider, ['type' => $key]));
37 37
         });
38 38
     }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public static function getEnabledProviders(): Collection
46 46
     {
47
-        return static::getProviders()->filter(function (SocialiteProvider $provider) {
47
+        return static::getProviders()->filter(function(SocialiteProvider $provider) {
48 48
             return $provider->enabled ?? false;
49 49
         });
50 50
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     {
61 61
         $options = config("services.{$provider}", []);
62 62
 
63
-        return tap(static::driver($provider), function (Provider $socialite) use ($provider, $options) {
63
+        return tap(static::driver($provider), function(Provider $socialite) use ($provider, $options) {
64 64
             $scopes = $options['scopes'] ?? [];
65 65
             $with   = $options['with'] ?? [];
66 66
             $fields = $options['fields'] ?? [];
Please login to merge, or discard this patch.
src/Authorization/Http/Routes/WebRoutes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
      */
44 44
     public function map(): void
45 45
     {
46
-        $this->adminGroup(function () {
46
+        $this->adminGroup(function() {
47 47
             static::mapRouteClasses($this->getRouteClasses());
48 48
         });
49 49
     }
Please login to merge, or discard this patch.
src/Authorization/Http/Routes/Web/AdministratorsRoutes.php 1 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::auth.administrators.index
36 36
             $this->get('/', [AdministratorsController::class, 'index'])
37 37
                  ->name('index');
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             $this->post('store', [AdministratorsController::class, 'store'])
53 53
                  ->name('store');
54 54
 
55
-            $this->prefix('{'.static::WILDCARD_ADMIN.'}')->group(function () {
55
+            $this->prefix('{'.static::WILDCARD_ADMIN.'}')->group(function() {
56 56
                 // admin::auth.administrators.show
57 57
                 $this->get('/', [AdministratorsController::class, 'show'])
58 58
                      ->name('show');
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public function bindings(AdministratorsRepository $repo): void
101 101
     {
102
-        $this->bind(static::WILDCARD_ADMIN, function (string $uuid) use ($repo) {
102
+        $this->bind(static::WILDCARD_ADMIN, function(string $uuid) use ($repo) {
103 103
             return $repo->firstWhereUuidOrFail($uuid);
104 104
         });
105 105
 
Please login to merge, or discard this patch.
src/Authorization/Http/Routes/Web/UsersRoutes.php 1 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::auth.users.index
36 36
             $this->get('/', [UsersController::class, 'index'])
37 37
                  ->name('index');
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             $this->post('store', [UsersController::class, 'store'])
53 53
                  ->name('store');
54 54
 
55
-            $this->prefix('{'.static::USER_WILDCARD.'}')->group(function () {
55
+            $this->prefix('{'.static::USER_WILDCARD.'}')->group(function() {
56 56
                 // admin::auth.users.show
57 57
                 $this->get('/', [UsersController::class, 'show'])
58 58
                      ->name('show');
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function bindings(UsersRepository $repo): void
103 103
     {
104
-        $this->bind(static::USER_WILDCARD, function (string $uuid) use ($repo) {
104
+        $this->bind(static::USER_WILDCARD, function(string $uuid) use ($repo) {
105 105
             return $repo->firstWhereUuidOrFail($uuid);
106 106
         });
107 107
     }
Please login to merge, or discard this patch.
src/Authorization/Http/Routes/Web/ProfileRoutes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,20 +23,20 @@
 block discarded – undo
23 23
      */
24 24
     public function map(): void
25 25
     {
26
-        $this->prefix('profile')->name('profile.')->middleware(['administrator.password.confirm'])->group(function () {
26
+        $this->prefix('profile')->name('profile.')->middleware(['administrator.password.confirm'])->group(function() {
27 27
             // admin::auth.profile.index
28 28
             $this->get('/', [ProfileController::class, 'index'])
29 29
                  ->name('index');
30 30
 
31 31
             // Account
32
-            $this->prefix('account')->name('account.')->group(function () {
32
+            $this->prefix('account')->name('account.')->group(function() {
33 33
                 // admin::auth.profile.account.update
34 34
                 $this->put('update', [ProfileController::class, 'updateAccount'])
35 35
                      ->name('update');
36 36
             });
37 37
 
38 38
             // Password
39
-            $this->prefix('password')->name('password.')->group(function () {
39
+            $this->prefix('password')->name('password.')->group(function() {
40 40
                 // admin::auth.profile.password.update
41 41
                 $this->put('update', [ProfileController::class, 'updatePassword'])
42 42
                      ->name('update');
Please login to merge, or discard this patch.