Passed
Pull Request — master (#14)
by ARCANEDEV
06:41
created
src/Auth/Http/Routes/RolesRoutes.php 1 patch
Spacing   +6 added lines, -6 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('roles.')->prefix('roles')->group(function () {
36
+        $this->adminGroup(function() {
37
+            $this->name('roles.')->prefix('roles')->group(function() {
38 38
                 // admin::auth.roles.index
39 39
                 $this->get('/', [RolesController::class, 'index'])
40 40
                      ->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('{'.self::ROLE_WILDCARD.'}')->group(function () {
56
+                $this->prefix('{'.self::ROLE_WILDCARD.'}')->group(function() {
57 57
                     // admin::auth.roles.show
58 58
                     $this->get('/', [RolesController::class, 'show'])
59 59
                          ->name('show');
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                          ->middleware(['ajax'])
77 77
                          ->name('delete');
78 78
 
79
-                    $this->namespace('Roles')->group(function () {
79
+                    $this->namespace('Roles')->group(function() {
80 80
                         static::mapRouteClasses([
81 81
                             Roles\PermissionsRoutes::class,
82 82
                             Roles\UsersRoutes::class,
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      */
93 93
     protected function mapDataTablesRoutes(): void
94 94
     {
95
-        $this->dataTableGroup(function () {
95
+        $this->dataTableGroup(function() {
96 96
             // admin::auth.roles.datatables.index
97 97
             $this->get('/', [RolesDataTablesController::class, 'index'])
98 98
                  ->name('index');
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function bindings(RolesRepository $repo): void
108 108
     {
109
-        $this->bind(self::ROLE_WILDCARD, function (string $uuid) use ($repo) {
109
+        $this->bind(self::ROLE_WILDCARD, function(string $uuid) use ($repo) {
110 110
             return $repo->firstWithUuidOrFail($uuid);
111 111
         });
112 112
 
Please login to merge, or discard this patch.
src/Auth/Http/Transformers/AbstractTransformer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     protected static function renderActions(array $actions)
32 32
     {
33
-        return implode(PHP_EOL, array_map(function (Htmlable $action) {
33
+        return implode(PHP_EOL, array_map(function(Htmlable $action) {
34 34
             return $action->toHtml();
35 35
         }, $actions));
36 36
     }
Please login to merge, or discard this patch.
src/Auth/Http/Controllers/Datatables/PermissionsController.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 index(DataTables $dataTables, PermissionsRepository $permissionsRepo, Request $request)
26 26
     {
27
-        $query = $permissionsRepo->with(['group', 'roles' => function ($query) use ($request) {
27
+        $query = $permissionsRepo->with(['group', 'roles' => function($query) use ($request) {
28 28
             return $query->filterByAuthenticatedUser($request->user());
29 29
         }]);
30 30
 
Please login to merge, or discard this patch.
src/Auth/Database/Seeders/PermissionsSeeder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,10 +53,10 @@
 block discarded – undo
53 53
     protected function getPermissionsFromPolicyManager($abilities): Collection
54 54
     {
55 55
         return $this->policyManager()->abilities()
56
-            ->filter(function (Ability $ability) use ($abilities) {
56
+            ->filter(function(Ability $ability) use ($abilities) {
57 57
                 return Str::startsWith($ability->key(), $abilities);
58 58
             })
59
-            ->transform(function (Ability $ability) {
59
+            ->transform(function(Ability $ability) {
60 60
                 return new Permission(array_merge($ability->metas(), [
61 61
                     'ability' => $ability->key(),
62 62
                 ]));
Please login to merge, or discard this patch.
src/Auth/Database/Seeders/RolesSeeder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function seedMany(array $roles): void
31 31
     {
32
-        $roles = array_map(function (array $role) {
32
+        $roles = array_map(function(array $role) {
33 33
             return static::prepareRole($role);
34 34
         }, $roles);
35 35
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
     {
130 130
         $needles = Arr::wrap($needles);
131 131
 
132
-        return $permissions->filter(function ($ability) use ($needles) {
132
+        return $permissions->filter(function($ability) use ($needles) {
133 133
             return Str::startsWith($ability, $needles) || Str::is($needles, $ability);
134 134
         })->keys()->toArray();
135 135
     }
Please login to merge, or discard this patch.
src/Auth/Repositories/UsersRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     public function onlyTrashed(bool $condition = true)
66 66
     {
67
-        return $this->when($condition, function (Builder $q) {
67
+        return $this->when($condition, function(Builder $q) {
68 68
             return $q->onlyTrashed();
69 69
         });
70 70
     }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public function createMember(array $attributes): User
99 99
     {
100
-        return tap($this->createUser($attributes), function (User $user) {
100
+        return tap($this->createUser($attributes), function(User $user) {
101 101
             $this->syncRolesByKeys($user, [Role::MEMBER]);
102 102
         });
103 103
     }
Please login to merge, or discard this patch.
src/Auth/Repositories/RolesRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -293,7 +293,7 @@
 block discarded – undo
293 293
      */
294 294
     public function getFilteredByAuthenticatedUser(User $user): iterable
295 295
     {
296
-        return $this->get()->filter(function (Role $role) use ($user) {
296
+        return $this->get()->filter(function(Role $role) use ($user) {
297 297
             if ($user->isSuperAdmin())
298 298
                 return false;
299 299
 
Please login to merge, or discard this patch.
database/factories/UserFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
 /** @var  Illuminate\Database\Eloquent\Factory  $factory */
10 10
 
11
-$factory->define($userModel, function (Faker $faker) {
11
+$factory->define($userModel, function(Faker $faker) {
12 12
     return [
13 13
         'first_name'     => $faker->firstName,
14 14
         'last_name'      => $faker->lastName,
Please login to merge, or discard this patch.
migrations/2019_01_01_000002_create_auth_socialite_providers_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     public function up(): void
42 42
     {
43
-        $this->createSchema(function (Blueprint $table) {
43
+        $this->createSchema(function(Blueprint $table) {
44 44
             $table->bigIncrements('id');
45 45
             $table->unsignedBigInteger('user_id')->index();
46 46
             $table->string('provider_type', 50);
Please login to merge, or discard this patch.