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

@ -21,6 +21,9 @@ class ServerSummary extends Widget implements HasForms, HasInfolists
use InteractsWithForms;
use InteractsWithInfolists;
/**
* @var array<string>
*/
protected $listeners = ['$refresh'];
protected static bool $isLazy = false;
@ -39,7 +42,7 @@ public function infolist(Infolist $infolist): Infolist
->schema([
TextEntry::make('name')
->label('Name')
->url(fn (Server $record) => View::getUrl(parameters: ['server' => $record])),
->url(fn (Server $record): string => View::getUrl(parameters: ['server' => $record])),
TextEntry::make('ip')
->label('IP Address')
->icon('heroicon-o-clipboard-document')
@ -48,14 +51,12 @@ public function infolist(Infolist $infolist): Infolist
TextEntry::make('status')
->label('Status')
->badge()
->color(static function ($state): string {
return Server::$statusColors[$state];
})
->color(static fn ($state): string => Server::$statusColors[$state])
->suffixAction(
Action::make('check-status')
->icon('heroicon-o-arrow-path')
->tooltip('Check Connection')
->action(function (Server $record) {
->action(function (Server $record): void {
$previousStatus = $record->status;
$record = $record->checkConnection();