Add phpstan level 7(#544)

This commit is contained in:
Saeed Vaziry
2025-03-12 13:31:10 +01:00
committed by GitHub
parent c22bb1fa80
commit 493cbb0849
437 changed files with 4505 additions and 2193 deletions

View File

@ -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');