mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 06:56:15 +00:00
Add phpstan level 7(#544)
This commit is contained in:
@ -17,11 +17,17 @@ class Settings extends Page
|
||||
|
||||
protected static ?string $title = 'Settings';
|
||||
|
||||
/**
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $listeners = ['$refresh'];
|
||||
|
||||
public function mount(): void
|
||||
{
|
||||
$this->authorize('update', [$this->server, auth()->user()->currentProject]);
|
||||
/** @var \App\Models\User $user */
|
||||
$user = auth()->user();
|
||||
|
||||
$this->authorize('update', [$this->server, $user->currentProject]);
|
||||
}
|
||||
|
||||
public function getWidgets(): array
|
||||
@ -46,7 +52,7 @@ protected function getHeaderActions(): array
|
||||
->modalHeading('Delete Server')
|
||||
->modalDescription('Once your server is deleted, all of its resources and data will be permanently deleted and can\'t be restored')
|
||||
->authorize('delete', $this->server)
|
||||
->action(function () {
|
||||
->action(function (): void {
|
||||
try {
|
||||
$this->server->delete();
|
||||
|
||||
@ -68,7 +74,7 @@ protected function getHeaderActions(): array
|
||||
->icon('heroicon-o-arrow-path')
|
||||
->label('Reboot')
|
||||
->requiresConfirmation()
|
||||
->action(function () {
|
||||
->action(function (): void {
|
||||
app(RebootServer::class)->reboot($this->server);
|
||||
|
||||
$this->dispatch('$refresh');
|
||||
|
Reference in New Issue
Block a user