mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-04 23:42:34 +00:00
Add phpstan level 7(#544)
This commit is contained in:
@ -28,6 +28,9 @@ public static function canAccess(): bool
|
||||
return auth()->user()?->can('viewAny', User::class) ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, array<int, class-string>>
|
||||
*/
|
||||
public function getWidgets(): array
|
||||
{
|
||||
return [
|
||||
@ -48,7 +51,7 @@ protected function getHeaderActions(): array
|
||||
|
||||
return $user;
|
||||
})
|
||||
->form(function (Form $form) {
|
||||
->form(function (Form $form): \Filament\Forms\Form {
|
||||
$rules = CreateUser::rules();
|
||||
|
||||
return $form
|
||||
@ -61,7 +64,7 @@ protected function getHeaderActions(): array
|
||||
->rules($rules['password']),
|
||||
Select::make('role')
|
||||
->rules($rules['role'])
|
||||
->options(collect(config('core.user_roles'))->mapWithKeys(fn ($role) => [$role => $role])),
|
||||
->options(collect((array) config('core.user_roles'))->mapWithKeys(fn ($role) => [$role => $role])),
|
||||
])
|
||||
->columns(1);
|
||||
})
|
||||
|
Reference in New Issue
Block a user