mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
Add phpstan level 7(#544)
This commit is contained in:
@ -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');
|
||||
|
Reference in New Issue
Block a user