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

@ -42,18 +42,17 @@ protected function getHeaderActions(): array
{
$form = [
Select::make('server')
->options(function () {
return auth()->user()?->currentProject?->servers?->pluck('name', 'id') ?? [];
})
->options(fn () => auth()->user()?->currentProject?->servers?->pluck('name', 'id') ?? [])
->rules(fn (Get $get) => ExecuteScript::rules($get())['server'])
->searchable()
->reactive(),
Select::make('user')
->rules(fn (Get $get) => ExecuteScript::rules($get())['user'])
->native(false)
->options(function (Get $get) {
->options(function (Get $get): array {
$users = ['root'];
/** @var ?Server $server */
$server = Server::query()->find($get('server'));
if ($server) {
$users = $server->getSshUsers();
@ -74,7 +73,7 @@ protected function getHeaderActions(): array
->icon('heroicon-o-bolt')
->modalWidth(MaxWidth::Large)
->form($form)
->action(function (array $data) {
->action(function (array $data): void {
app(ExecuteScript::class)->execute($this->script, $data);
$this->dispatch('$refresh');