mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 15:02:34 +00:00
Add phpstan level 7(#544)
This commit is contained in:
@ -29,14 +29,19 @@ class ProfileInformation extends Widget implements HasForms
|
||||
|
||||
public function mount(): void
|
||||
{
|
||||
$this->name = auth()->user()->name;
|
||||
$this->email = auth()->user()->email;
|
||||
$this->timezone = auth()->user()->timezone;
|
||||
/** @var \App\Models\User $user */
|
||||
$user = auth()->user();
|
||||
$this->name = $user->name;
|
||||
$this->email = $user->email;
|
||||
$this->timezone = $user->timezone;
|
||||
}
|
||||
|
||||
public function form(Form $form): Form
|
||||
{
|
||||
$rules = UpdateUserProfileInformation::rules(auth()->user());
|
||||
/** @var \App\Models\User $user */
|
||||
$user = auth()->user();
|
||||
|
||||
$rules = UpdateUserProfileInformation::rules($user);
|
||||
|
||||
return $form
|
||||
->schema([
|
||||
@ -69,9 +74,12 @@ public function form(Form $form): Form
|
||||
|
||||
public function submit(): void
|
||||
{
|
||||
/** @var \App\Models\User $user */
|
||||
$user = auth()->user();
|
||||
|
||||
$this->validate();
|
||||
|
||||
app(UpdateUserProfileInformation::class)->update(auth()->user(), $this->all());
|
||||
app(UpdateUserProfileInformation::class)->update($user, $this->all());
|
||||
|
||||
Notification::make()
|
||||
->success()
|
||||
|
Reference in New Issue
Block a user