mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-10-09 14:23:19 +01:00
Fix Scramble API docs warnings
Remove redundant @var annotations from API resources and defer the user access in the email unique rule of UserUpdateRequest, so rules() can be evaluated by Scramble without route model binding. Add a test that fails on any Scramble diagnostic and tests for the email unique rule.
This commit is contained in:
@@ -43,9 +43,10 @@ class UserUpdateRequest extends BaseFormRequest
|
||||
'email' => [
|
||||
'email:rfc,strict',
|
||||
'max:255',
|
||||
UniqueEloquent::make(User::class, 'email')->ignore($this->user->id)->query(function (Builder $query) {
|
||||
UniqueEloquent::make(User::class, 'email')->query(function (Builder $query) {
|
||||
/** @var Builder<User> $query */
|
||||
return $query->where('is_placeholder', '=', false);
|
||||
return $query->where('is_placeholder', '=', false)
|
||||
->whereKeyNot($this->user->getKey());
|
||||
}),
|
||||
],
|
||||
'photo' => [
|
||||
|
||||
Reference in New Issue
Block a user