Passed
Pull Request — master (#14)
by ARCANEDEV
08:28
created
src/Auth/Repositories/SocialiteUsersRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
             'password'    => null,
112 112
         ];
113 113
 
114
-        return tap($this->getUsersRepository()->createOne($attributes), function ($user) {
114
+        return tap($this->getUsersRepository()->createOne($attributes), function($user) {
115 115
             event(new UserRegistered($user));
116 116
         });
117 117
     }
Please login to merge, or discard this patch.
src/Auth/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/Auth/Repositories/UsersRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function onlyTrashed(bool $condition = true)
76 76
     {
77
-        return $this->when($condition, function (Builder $query) {
77
+        return $this->when($condition, function(Builder $query) {
78 78
             return $query->onlyTrashed();
79 79
         });
80 80
     }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             $attributes['password'] = Str::random(8);
112 112
         }
113 113
 
114
-        return tap($this->model()->fill($attributes), function (User $user) use ($attributes) {
114
+        return tap($this->model()->fill($attributes), function(User $user) use ($attributes) {
115 115
             $user->forceFill([
116 116
                 'uuid'         => $attributes['uuid'] ?? Str::uuid(),
117 117
                 'activated_at' => $attributes['activated_at'] ?? now(), // TODO: Add a setting to change this
Please login to merge, or discard this patch.
src/Auth/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/Auth/Console/MakeUser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
      */
71 71
     protected static function defaultCreateUserCallback(): Closure
72 72
     {
73
-        return function (string $firstName, string $lastName, string $email, string $password) {
73
+        return function(string $firstName, string $lastName, string $email, string $password) {
74 74
             /** @var  \Arcanesoft\Foundation\Auth\Repositories\UsersRepository  $repo */
75 75
             $repo = app(UsersRepository::class);
76 76
             $now  = now();
Please login to merge, or discard this patch.
src/Auth/Console/MakeAdmin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
      */
72 72
     protected static function defaultCreateUserCallback(): Closure
73 73
     {
74
-        return function (string $firstName, string $lastName, string $email, string $password) {
74
+        return function(string $firstName, string $lastName, string $email, string $password) {
75 75
             $repo = static::getAdministratorsRepository();
76 76
 
77 77
             $administrator = $repo->createOne([
Please login to merge, or discard this patch.
src/Auth/Session/DatabaseSessionHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@
 block discarded – undo
212 212
             return $payload;
213 213
         }
214 214
 
215
-        return tap($payload, function (&$payload) {
215
+        return tap($payload, function(&$payload) {
216 216
             $this->addUserInformation($payload);
217 217
             $this->addRequestInformation($payload);
218 218
         });
Please login to merge, or discard this patch.
src/Auth/Views/Components/UsersDatatable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,13 +77,13 @@
 block discarded – undo
77 77
     {
78 78
         return $repo
79 79
             ->onlyTrashed($this->trash)
80
-            ->unless(empty($this->search), function (Builder $query) {
80
+            ->unless(empty($this->search), function(Builder $query) {
81 81
                 $query
82 82
                     ->where('first_name', 'like', '%'.$this->search.'%')
83 83
                     ->orWhere('last_name', 'like', '%'.$this->search.'%')
84 84
                     ->orWhere('email', 'like', '%'.$this->search.'%');
85 85
             })
86
-            ->unless(empty($this->sortField), function (Builder $query) {
86
+            ->unless(empty($this->sortField), function(Builder $query) {
87 87
                 $query->orderBy($this->sortField, $this->getSortDirection());
88 88
             })
89 89
             ->paginate($this->perPage);
Please login to merge, or discard this patch.
src/Auth/Views/Components/PasswordResetsDatatable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function render(PasswordResetsRepository $repo)
60 60
     {
61
-        return view('foundation::authorization.password-resets._datatables.index',[
61
+        return view('foundation::authorization.password-resets._datatables.index', [
62 62
             'passwordResets' => $this->getResults($repo),
63 63
             'fields'         => $this->getFields(),
64 64
         ]);
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
     private function getResults(PasswordResetsRepository $repo): LengthAwarePaginator
75 75
     {
76 76
         return $repo
77
-            ->unless(empty($this->search), function (Builder $query) {
77
+            ->unless(empty($this->search), function(Builder $query) {
78 78
                 $query->Where('email', 'like', '%'.$this->search.'%');
79 79
             })
80
-            ->unless(empty($this->sortField), function (Builder $query) {
80
+            ->unless(empty($this->sortField), function(Builder $query) {
81 81
                 $query->orderBy($this->sortField, $this->getSortDirection());
82 82
             })
83 83
             ->paginate($this->perPage);
Please login to merge, or discard this patch.