diff --git a/src/Fields/BelongsToMany.php b/src/Fields/BelongsToMany.php index f3626225c..7e0c220d8 100644 --- a/src/Fields/BelongsToMany.php +++ b/src/Fields/BelongsToMany.php @@ -6,7 +6,6 @@ use Binaryk\LaravelRestify\Fields\Concerns\Attachable; use Binaryk\LaravelRestify\Repositories\Repository; use Closure; -use Exception; use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Http\Request; use Illuminate\Support\Facades\Gate; @@ -55,7 +54,7 @@ public function resolve($repository, $attribute = null) ->allowToShow(app(Request::class)) ->withExtraFields( collect($this->pivotFields)->each(function (Field $field) use ($item) { - return $field->resolveCallback(fn() => $item->pivot->{$field->attribute}); + return $field->resolveCallback(fn () => $item->pivot->{$field->attribute}); })->all() ) ->eagerState(); diff --git a/src/Services/Concerns/ResetsPasswords.php b/src/Services/Concerns/ResetsPasswords.php index d355a1c99..c5a94dd01 100644 --- a/src/Services/Concerns/ResetsPasswords.php +++ b/src/Services/Concerns/ResetsPasswords.php @@ -11,7 +11,6 @@ trait ResetsPasswords { - /** * Get the post register / login redirect path. * @@ -57,8 +56,8 @@ public function reset(Request $request) // database. Otherwise we will parse the error and return the response. $response = $this->broker()->reset( $this->credentials($request), function ($user, $password) { - $this->resetPassword($user, $password); - } + $this->resetPassword($user, $password); + } ); // If the password was successfully reset, we will redirect the user back to diff --git a/src/Services/Concerns/ThrottlesLogins.php b/src/Services/Concerns/ThrottlesLogins.php index bd117a182..768c4d4df 100644 --- a/src/Services/Concerns/ThrottlesLogins.php +++ b/src/Services/Concerns/ThrottlesLogins.php @@ -2,11 +2,11 @@ namespace Binaryk\LaravelRestify\Services\Concerns; -use Illuminate\Support\Str; -use Illuminate\Http\Request; -use Illuminate\Cache\RateLimiter; use Illuminate\Auth\Events\Lockout; +use Illuminate\Cache\RateLimiter; +use Illuminate\Http\Request; use Illuminate\Support\Facades\Lang; +use Illuminate\Support\Str; use Illuminate\Validation\ValidationException; trait ThrottlesLogins diff --git a/tests/Fields/HasManyTest.php b/tests/Fields/HasManyTest.php index 3167c671d..89d1c2167 100644 --- a/tests/Fields/HasManyTest.php +++ b/tests/Fields/HasManyTest.php @@ -41,7 +41,7 @@ public function test_has_many_present_on_relations() $user = factory(User::class)->create(); factory(Post::class)->times(2)->create([ - 'user_id' => $user->id + 'user_id' => $user->id, ]); $this->get(UserWithPosts::uriKey()."/$user->id?related=posts") @@ -51,8 +51,8 @@ public function test_has_many_present_on_relations() 'posts' => [ [ 'id', - 'attributes' - ] + 'attributes', + ], ], ], ],