rector: arrrrr

This commit is contained in:
Andras Bacsai
2025-01-07 14:52:08 +01:00
parent c702ebff6d
commit 16c0cd10d8
349 changed files with 4204 additions and 3712 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Actions\Server;
use App\Models\Server;
use Exception;
use Lorisleiva\Actions\Concerns\AsAction;
class ValidateServer
@@ -34,7 +35,7 @@ class ValidateServer
$server->update([
'validation_logs' => $this->error,
]);
throw new \Exception($this->error);
throw new Exception($this->error);
}
$this->supported_os_type = $server->validateOS();
if (! $this->supported_os_type) {
@@ -42,7 +43,7 @@ class ValidateServer
$server->update([
'validation_logs' => $this->error,
]);
throw new \Exception($this->error);
throw new Exception($this->error);
}
$this->docker_installed = $server->validateDockerEngine();
@@ -52,18 +53,17 @@ class ValidateServer
$server->update([
'validation_logs' => $this->error,
]);
throw new \Exception($this->error);
throw new Exception($this->error);
}
$this->docker_version = $server->validateDockerEngineVersion();
if ($this->docker_version) {
return 'OK';
} else {
$this->error = 'Docker Engine is not installed. Please install Docker manually before continuing: <a target="_blank" class="text-black underline dark:text-white" href="https://docs.docker.com/engine/install/#server">documentation</a>.';
$server->update([
'validation_logs' => $this->error,
]);
throw new \Exception($this->error);
}
$this->error = 'Docker Engine is not installed. Please install Docker manually before continuing: <a target="_blank" class="text-black underline dark:text-white" href="https://docs.docker.com/engine/install/#server">documentation</a>.';
$server->update([
'validation_logs' => $this->error,
]);
throw new Exception($this->error);
}
}