});
}
- protected function rules(int $userId = null): array
+ protected function rules(?int $userId = null): array
{
return [
'create' => [
'string',
'email',
'min:2',
- (new Unique('users', 'email'))->ignore($userId ?? null),
+ (new Unique('users', 'email'))->ignore($userId),
],
'external_auth_id' => ['string'],
'language' => ['string', 'max:15', 'alpha_dash'],
return $this->apiListingResponse($users, [
'id', 'name', 'slug', 'email', 'external_auth_id',
'created_at', 'updated_at', 'last_activity_at',
- ], [Closure::fromCallable([$this, 'listFormatter'])]);
+ ], [$this->listFormatter(...)]);
}
/**