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

@ -10,6 +10,11 @@
class UninstallNodeJS
{
/**
* @param array<string, mixed> $input
*
* @throws ValidationException
*/
public function uninstall(Server $server, array $input): void
{
$this->validate($server, $input);
@ -19,16 +24,18 @@ public function uninstall(Server $server, array $input): void
$nodejs->status = ServiceStatus::UNINSTALLING;
$nodejs->save();
dispatch(function () use ($nodejs) {
dispatch(function () use ($nodejs): void {
$nodejs->handler()->uninstall();
$nodejs->delete();
})->catch(function () use ($nodejs) {
})->catch(function () use ($nodejs): void {
$nodejs->status = ServiceStatus::FAILED;
$nodejs->save();
})->onConnection('ssh');
}
/**
* @param array<string, mixed> $input
*
* @throws ValidationException
*/
private function validate(Server $server, array $input): void