mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-05 07:52:34 +00:00
Add phpstan level 7(#544)
This commit is contained in:
@ -21,8 +21,14 @@ class ServicesList extends TableWidget
|
||||
{
|
||||
public Server $server;
|
||||
|
||||
/**
|
||||
* @var array<string>
|
||||
*/
|
||||
protected $listeners = ['$refresh'];
|
||||
|
||||
/**
|
||||
* @return Builder<Service>
|
||||
*/
|
||||
protected function getTableQuery(): Builder
|
||||
{
|
||||
return Service::query()->where('server_id', $this->server->id);
|
||||
@ -33,7 +39,7 @@ protected function getTableColumns(): array
|
||||
return [
|
||||
IconColumn::make('id')
|
||||
->label('Service')
|
||||
->icon(fn (Service $record) => 'icon-'.$record->name)
|
||||
->icon(fn (Service $record): string => 'icon-'.$record->name)
|
||||
->width(24),
|
||||
TextColumn::make('name')
|
||||
->sortable(),
|
||||
@ -78,7 +84,7 @@ private function serviceAction(string $type, string $icon): Action
|
||||
->authorize(fn (Service $service) => auth()->user()?->can($type, $service))
|
||||
->label(ucfirst($type).' Service')
|
||||
->icon($icon)
|
||||
->action(function (Service $service) use ($type) {
|
||||
->action(function (Service $service) use ($type): void {
|
||||
try {
|
||||
app(Manage::class)->$type($service);
|
||||
} catch (Exception $e) {
|
||||
@ -102,7 +108,7 @@ private function uninstallAction(): Action
|
||||
->icon('heroicon-o-trash')
|
||||
->color('danger')
|
||||
->requiresConfirmation()
|
||||
->action(function (Service $service) {
|
||||
->action(function (Service $service): void {
|
||||
try {
|
||||
app(Uninstall::class)->uninstall($service);
|
||||
|
||||
|
Reference in New Issue
Block a user