Fix styling

This commit is contained in:
samirimtiaz1996 2024-06-19 07:07:49 +00:00 committed by github-actions[bot]
parent e023be1f25
commit f3beacdc3f
53 changed files with 92 additions and 185 deletions

View File

@ -11,6 +11,5 @@ class ServerMetadata extends Data
public function __construct(
public ?ProxyTypes $type,
public ?ProxyStatus $status
) {
}
) {}
}

View File

@ -10,8 +10,5 @@ class ProxyStarted
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public function __construct(public $data)
{
}
public function __construct(public $data) {}
}

View File

@ -4,6 +4,4 @@
use Exception;
class ProcessException extends Exception
{
}
class ProcessException extends Exception {}

View File

@ -49,7 +49,7 @@ public function domains(Request $request)
'ip' => $settings->public_ipv6,
]);
}
if (!$settings->public_ipv4 && !$settings->public_ipv6) {
if (! $settings->public_ipv4 && ! $settings->public_ipv6) {
$domains->push([
'domain' => $fqdn,
'ip' => $ip,
@ -85,7 +85,7 @@ public function domains(Request $request)
'ip' => $settings->public_ipv6,
]);
}
if (!$settings->public_ipv4 && !$settings->public_ipv6) {
if (! $settings->public_ipv4 && ! $settings->public_ipv6) {
$domains->push([
'domain' => $fqdn,
'ip' => $ip,
@ -129,32 +129,33 @@ public function updateDomains(Request $request)
return response()->json([
'success' => false,
'message' => 'Validation failed',
'errors' => $validator->errors()
'errors' => $validator->errors(),
], 422);
}
$application = Application::where('uuid', $request->uuid)->first();
if (!$application) {
if (! $application) {
return response()->json([
'success' => false,
'message' => 'Application not found'
'message' => 'Application not found',
], 404);
}
$existingDomains = explode(',', $application->fqdn);
$newDomains = $request->domains;
$filteredNewDomains = array_filter($newDomains, function ($domain) use ($existingDomains) {
return !in_array($domain, $existingDomains);
return ! in_array($domain, $existingDomains);
});
$mergedDomains = array_unique(array_merge($existingDomains, $filteredNewDomains));
$application->fqdn = implode(',', $mergedDomains);
$application->custom_labels = base64_encode(implode("\n ", generateLabelsApplication($application)));
$application->save();
return response()->json([
'success' => true,
'message' => 'Domains updated successfully',
'application' => $application
'application' => $application,
]);
}
@ -174,16 +175,16 @@ public function deleteDomains(Request $request)
return response()->json([
'success' => false,
'message' => 'Validation failed',
'errors' => $validator->errors()
'errors' => $validator->errors(),
], 422);
}
$application = Application::where('uuid', $request->uuid)->first();
if (!$application) {
if (! $application) {
return response()->json([
'success' => false,
'message' => 'Application not found'
'message' => 'Application not found',
], 404);
}
@ -193,10 +194,11 @@ public function deleteDomains(Request $request)
$application->fqdn = implode(',', $updatedDomains);
$application->custom_labels = base64_encode(implode("\n ", generateLabelsApplication($application)));
$application->save();
return response()->json([
'success' => true,
'message' => 'Domains updated successfully',
'application' => $application
'application' => $application,
]);
}
}

View File

@ -25,8 +25,7 @@ public function __construct(
public ApplicationPreview $preview,
public ProcessStatus $status,
public ?string $deployment_uuid = null
) {
}
) {}
public function handle()
{

View File

@ -19,9 +19,7 @@ class CheckLogDrainContainerJob implements ShouldBeEncrypted, ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(public Server $server)
{
}
public function __construct(public Server $server) {}
public function middleware(): array
{

View File

@ -14,9 +14,7 @@ class CheckResaleLicenseJob implements ShouldBeEncrypted, ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct()
{
}
public function __construct() {}
public function handle(): void
{

View File

@ -15,9 +15,7 @@ class CleanupHelperContainersJob implements ShouldBeEncrypted, ShouldBeUnique, S
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(public Server $server)
{
}
public function __construct(public Server $server) {}
public function handle(): void
{

View File

@ -16,10 +16,7 @@ class CleanupInstanceStuffsJob implements ShouldBeEncrypted, ShouldBeUnique, Sho
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct()
{
}
public function __construct() {}
// public function uniqueId(): string
// {

View File

@ -23,9 +23,7 @@ public function backoff(): int
return isDev() ? 1 : 3;
}
public function __construct(public Server $server)
{
}
public function __construct(public Server $server) {}
public function middleware(): array
{

View File

@ -23,8 +23,7 @@ public function __construct(
public bool $ignore_errors = false,
public $call_event_on_finish = null,
public $call_event_data = null
) {
}
) {}
/**
* Execute the job.

View File

@ -18,9 +18,7 @@ class DatabaseBackupStatusJob implements ShouldBeEncrypted, ShouldQueue
public $tries = 1;
public function __construct()
{
}
public function __construct() {}
public function handle()
{

View File

@ -28,9 +28,7 @@ class DeleteResourceJob implements ShouldBeEncrypted, ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(public Application|Service|StandalonePostgresql|StandaloneRedis|StandaloneMongodb|StandaloneMysql|StandaloneMariadb|StandaloneKeydb|StandaloneDragonfly|StandaloneClickhouse $resource, public bool $deleteConfigurations = false)
{
}
public function __construct(public Application|Service|StandalonePostgresql|StandaloneRedis|StandaloneMongodb|StandaloneMysql|StandaloneMariadb|StandaloneKeydb|StandaloneDragonfly|StandaloneClickhouse $resource, public bool $deleteConfigurations = false) {}
public function handle()
{

View File

@ -22,9 +22,7 @@ class DockerCleanupJob implements ShouldBeEncrypted, ShouldQueue
public ?int $usageBefore = null;
public function __construct(public Server $server)
{
}
public function __construct(public Server $server) {}
public function handle(): void
{

View File

@ -23,9 +23,7 @@ public function backoff(): int
return isDev() ? 1 : 3;
}
public function __construct(public GithubApp $github_app)
{
}
public function __construct(public GithubApp $github_app) {}
public function middleware(): array
{

View File

@ -19,9 +19,7 @@ class InstanceAutoUpdateJob implements ShouldBeEncrypted, ShouldBeUnique, Should
public $tries = 1;
public function __construct()
{
}
public function __construct() {}
public function handle(): void
{

View File

@ -19,9 +19,7 @@ class PullCoolifyImageJob implements ShouldBeEncrypted, ShouldQueue
public $timeout = 1000;
public function __construct()
{
}
public function __construct() {}
public function handle(): void
{

View File

@ -27,9 +27,7 @@ public function uniqueId(): string
return $this->server->uuid;
}
public function __construct(public Server $server)
{
}
public function __construct(public Server $server) {}
public function handle(): void
{

View File

@ -28,9 +28,7 @@ public function uniqueId(): string
return $this->server->uuid;
}
public function __construct(public Server $server)
{
}
public function __construct(public Server $server) {}
public function handle(): void
{

View File

@ -17,9 +17,7 @@ class PullTemplatesFromCDN implements ShouldBeEncrypted, ShouldQueue
public $timeout = 10;
public function __construct()
{
}
public function __construct() {}
public function handle(): void
{

View File

@ -17,9 +17,7 @@ class PullVersionsFromCDN implements ShouldBeEncrypted, ShouldQueue
public $timeout = 10;
public function __construct()
{
}
public function __construct() {}
public function handle(): void
{

View File

@ -14,9 +14,7 @@ class SendConfirmationForWaitlistJob implements ShouldBeEncrypted, ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(public string $email, public string $uuid)
{
}
public function __construct(public string $email, public string $uuid) {}
public function handle()
{

View File

@ -31,8 +31,7 @@ class SendMessageToDiscordJob implements ShouldBeEncrypted, ShouldQueue
public function __construct(
public string $text,
public string $webhookUrl
) {
}
) {}
/**
* Execute the job.

View File

@ -33,8 +33,7 @@ public function __construct(
public string $token,
public string $chatId,
public ?string $topicId = null,
) {
}
) {}
/**
* Execute the job.

View File

@ -16,9 +16,7 @@ class ServerFilesFromServerJob implements ShouldBeEncrypted, ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(public ServiceApplication|ServiceDatabase|Application $resource)
{
}
public function __construct(public ServiceApplication|ServiceDatabase|Application $resource) {}
public function handle()
{

View File

@ -24,9 +24,7 @@ public function backoff(): int
return isDev() ? 1 : 3;
}
public function __construct(public Team $team)
{
}
public function __construct(public Team $team) {}
public function middleware(): array
{

View File

@ -25,9 +25,7 @@ public function backoff(): int
return isDev() ? 1 : 3;
}
public function __construct(public Server $server)
{
}
public function __construct(public Server $server) {}
public function middleware(): array
{

View File

@ -14,9 +14,7 @@ class ServerStorageSaveJob implements ShouldBeEncrypted, ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(public LocalFileVolume $localFileVolume)
{
}
public function __construct(public LocalFileVolume $localFileVolume) {}
public function handle()
{

View File

@ -15,9 +15,7 @@ class SubscriptionInvoiceFailedJob implements ShouldBeEncrypted, ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(protected Team $team)
{
}
public function __construct(protected Team $team) {}
public function handle()
{

View File

@ -17,8 +17,7 @@ class SubscriptionTrialEndedJob implements ShouldBeEncrypted, ShouldQueue
public function __construct(
public Team $team
) {
}
) {}
public function handle(): void
{

View File

@ -17,8 +17,7 @@ class SubscriptionTrialEndsSoonJob implements ShouldBeEncrypted, ShouldQueue
public function __construct(
public Team $team
) {
}
) {}
public function handle(): void
{

View File

@ -9,9 +9,7 @@
class MaintenanceModeDisabledNotification
{
public function __construct()
{
}
public function __construct() {}
public function handle(EventsMaintenanceModeDisabled $event): void
{

View File

@ -9,9 +9,7 @@ class ProxyStartedNotification
{
public Server $server;
public function __construct()
{
}
public function __construct() {}
public function handle(ProxyStarted $event): void
{

View File

@ -66,7 +66,7 @@ public function delete_configurations()
$workdir = $this->workdir();
if (str($workdir)->endsWith($this->uuid)) {
ray('Deleting workdir');
instant_remote_process(['rm -rf ' . $this->workdir()], $server, false);
instant_remote_process(['rm -rf '.$this->workdir()], $server, false);
}
}
@ -165,7 +165,7 @@ public function type()
public function publishDirectory(): Attribute
{
return Attribute::make(
set: fn ($value) => $value ? '/' . ltrim($value, '/') : null,
set: fn ($value) => $value ? '/'.ltrim($value, '/') : null,
);
}
@ -173,7 +173,7 @@ public function gitBranchLocation(): Attribute
{
return Attribute::make(
get: function () {
if (!is_null($this->source?->html_url) && !is_null($this->git_repository) && !is_null($this->git_branch)) {
if (! is_null($this->source?->html_url) && ! is_null($this->git_repository) && ! is_null($this->git_branch)) {
return "{$this->source->html_url}/{$this->git_repository}/tree/{$this->git_branch}";
}
// Convert the SSH URL to HTTPS URL
@ -192,7 +192,7 @@ public function gitWebhook(): Attribute
{
return Attribute::make(
get: function () {
if (!is_null($this->source?->html_url) && !is_null($this->git_repository) && !is_null($this->git_branch)) {
if (! is_null($this->source?->html_url) && ! is_null($this->git_repository) && ! is_null($this->git_branch)) {
return "{$this->source->html_url}/{$this->git_repository}/settings/hooks";
}
// Convert the SSH URL to HTTPS URL
@ -211,7 +211,7 @@ public function gitCommits(): Attribute
{
return Attribute::make(
get: function () {
if (!is_null($this->source?->html_url) && !is_null($this->git_repository) && !is_null($this->git_branch)) {
if (! is_null($this->source?->html_url) && ! is_null($this->git_repository) && ! is_null($this->git_branch)) {
return "{$this->source->html_url}/{$this->git_repository}/commits/{$this->git_branch}";
}
// Convert the SSH URL to HTTPS URL
@ -228,7 +228,7 @@ public function gitCommits(): Attribute
public function gitCommitLink($link): string
{
if (!is_null($this->source?->html_url) && !is_null($this->git_repository) && !is_null($this->git_branch)) {
if (! is_null($this->source?->html_url) && ! is_null($this->git_repository) && ! is_null($this->git_branch)) {
if (str($this->source->html_url)->contains('bitbucket')) {
return "{$this->source->html_url}/{$this->git_repository}/commits/{$link}";
}
@ -244,7 +244,7 @@ public function gitCommitLink($link): string
$git_repository = str_replace('.git', '', $this->git_repository);
$url = Url::fromString($git_repository);
$url = $url->withUserInfo('');
$url = $url->withPath($url->getPath() . '/commits/' . $link);
$url = $url->withPath($url->getPath().'/commits/'.$link);
return $url->__toString();
}
@ -306,7 +306,7 @@ public function dockerComposePrLocation(): Attribute
public function baseDirectory(): Attribute
{
return Attribute::make(
set: fn ($value) => '/' . ltrim($value, '/'),
set: fn ($value) => '/'.ltrim($value, '/'),
);
}
@ -622,7 +622,7 @@ public function isHealthcheckDisabled(): bool
public function workdir()
{
return application_configuration_dir() . "/{$this->uuid}";
return application_configuration_dir()."/{$this->uuid}";
}
public function isLogDrainEnabled()
@ -632,7 +632,7 @@ public function isLogDrainEnabled()
public function isConfigurationChanged(bool $save = false)
{
$newConfigHash = $this->fqdn . $this->git_repository . $this->git_branch . $this->git_commit_sha . $this->build_pack . $this->static_image . $this->install_command . $this->build_command . $this->start_command . $this->ports_exposes . $this->ports_mappings . $this->base_directory . $this->publish_directory . $this->dockerfile . $this->dockerfile_location . $this->custom_labels . $this->custom_docker_run_options . $this->dockerfile_target_build . $this->redirect;
$newConfigHash = $this->fqdn.$this->git_repository.$this->git_branch.$this->git_commit_sha.$this->build_pack.$this->static_image.$this->install_command.$this->build_command.$this->start_command.$this->ports_exposes.$this->ports_mappings.$this->base_directory.$this->publish_directory.$this->dockerfile.$this->dockerfile_location.$this->custom_labels.$this->custom_docker_run_options.$this->dockerfile_target_build.$this->redirect;
if ($this->pull_request_id === 0 || $this->pull_request_id === null) {
$newConfigHash .= json_encode($this->environment_variables()->get('value')->sort());
} else {
@ -727,7 +727,7 @@ public function generateGitImportCommands(string $deployment_uuid, int $pull_req
if ($this->source->is_public) {
$fullRepoUrl = "{$this->source->html_url}/{$customRepository}";
$git_clone_command = "{$git_clone_command} {$this->source->html_url}/{$customRepository} {$baseDir}";
if (!$only_checkout) {
if (! $only_checkout) {
$git_clone_command = $this->setGitImportSettings($deployment_uuid, $git_clone_command, public: true);
}
if ($exec_in_docker) {
@ -744,7 +744,7 @@ public function generateGitImportCommands(string $deployment_uuid, int $pull_req
$git_clone_command = "{$git_clone_command} $source_html_url_scheme://x-access-token:$github_access_token@$source_html_url_host/{$customRepository} {$baseDir}";
$fullRepoUrl = "$source_html_url_scheme://x-access-token:$github_access_token@$source_html_url_host/{$customRepository}";
}
if (!$only_checkout) {
if (! $only_checkout) {
$git_clone_command = $this->setGitImportSettings($deployment_uuid, $git_clone_command, public: false);
}
if ($exec_in_docker) {
@ -805,7 +805,7 @@ public function generateGitImportCommands(string $deployment_uuid, int $pull_req
} else {
$commands->push("echo 'Checking out $branch'");
}
$git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" git fetch origin $branch && " . $this->buildGitCheckoutCommand($pr_branch_name);
$git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" git fetch origin $branch && ".$this->buildGitCheckoutCommand($pr_branch_name);
} elseif ($git_type === 'github') {
$branch = "pull/{$pull_request_id}/head:$pr_branch_name";
if ($exec_in_docker) {
@ -813,14 +813,14 @@ public function generateGitImportCommands(string $deployment_uuid, int $pull_req
} else {
$commands->push("echo 'Checking out $branch'");
}
$git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" git fetch origin $branch && " . $this->buildGitCheckoutCommand($pr_branch_name);
$git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" git fetch origin $branch && ".$this->buildGitCheckoutCommand($pr_branch_name);
} elseif ($git_type === 'bitbucket') {
if ($exec_in_docker) {
$commands->push(executeInDocker($deployment_uuid, "echo 'Checking out $branch'"));
} else {
$commands->push("echo 'Checking out $branch'");
}
$git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" " . $this->buildGitCheckoutCommand($commit);
$git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" ".$this->buildGitCheckoutCommand($commit);
}
}
@ -849,7 +849,7 @@ public function generateGitImportCommands(string $deployment_uuid, int $pull_req
} else {
$commands->push("echo 'Checking out $branch'");
}
$git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" git fetch origin $branch && " . $this->buildGitCheckoutCommand($pr_branch_name);
$git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" git fetch origin $branch && ".$this->buildGitCheckoutCommand($pr_branch_name);
} elseif ($git_type === 'github') {
$branch = "pull/{$pull_request_id}/head:$pr_branch_name";
if ($exec_in_docker) {
@ -857,14 +857,14 @@ public function generateGitImportCommands(string $deployment_uuid, int $pull_req
} else {
$commands->push("echo 'Checking out $branch'");
}
$git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" git fetch origin $branch && " . $this->buildGitCheckoutCommand($pr_branch_name);
$git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" git fetch origin $branch && ".$this->buildGitCheckoutCommand($pr_branch_name);
} elseif ($git_type === 'bitbucket') {
if ($exec_in_docker) {
$commands->push(executeInDocker($deployment_uuid, "echo 'Checking out $branch'"));
} else {
$commands->push("echo 'Checking out $branch'");
}
$git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" " . $this->buildGitCheckoutCommand($commit);
$git_clone_command = "{$git_clone_command} && cd {$baseDir} && GIT_SSH_COMMAND=\"ssh -o ConnectTimeout=30 -p {$customPort} -o Port={$customPort} -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /root/.ssh/id_rsa\" ".$this->buildGitCheckoutCommand($commit);
}
}
@ -916,20 +916,20 @@ public function parseRawCompose()
}
if ($source->startsWith('.')) {
$source = $source->after('.');
$source = $workdir . $source;
$source = $workdir.$source;
}
$commands->push("mkdir -p $source > /dev/null 2>&1 || true");
}
}
}
$labels = collect(data_get($service, 'labels', []));
if (!$labels->contains('coolify.managed')) {
if (! $labels->contains('coolify.managed')) {
$labels->push('coolify.managed=true');
}
if (!$labels->contains('coolify.applicationId')) {
$labels->push('coolify.applicationId=' . $this->id);
if (! $labels->contains('coolify.applicationId')) {
$labels->push('coolify.applicationId='.$this->id);
}
if (!$labels->contains('coolify.type')) {
if (! $labels->contains('coolify.type')) {
$labels->push('coolify.type=application');
}
data_set($service, 'labels', $labels->toArray());
@ -977,7 +977,7 @@ public function loadComposeFile($isInit = false)
"cat .$workdir$composeFile",
]);
$composeFileContent = instant_remote_process($commands, $this->destination->server, false);
if (!$composeFileContent) {
if (! $composeFileContent) {
$this->docker_compose_location = $initialDockerComposeLocation;
$this->save();
$commands = collect([
@ -1001,7 +1001,7 @@ public function loadComposeFile($isInit = false)
$jsonNames = $json->keys()->toArray();
$diff = array_diff($jsonNames, $names);
$json = $json->filter(function ($value, $key) use ($diff) {
return !in_array($key, $diff);
return ! in_array($key, $diff);
});
if ($json) {
$this->docker_compose_domains = json_encode($json);
@ -1021,7 +1021,7 @@ public function loadComposeFile($isInit = false)
public function parseContainerLabels(?ApplicationPreview $preview = null)
{
$customLabels = data_get($this, 'custom_labels');
if (!$customLabels) {
if (! $customLabels) {
return;
}
if (base64_encode(base64_decode($customLabels, true)) !== $customLabels) {
@ -1104,10 +1104,10 @@ public function parseHealthcheckFromDockerfile($dockerfile, bool $isInit = false
continue;
}
if (isset($healthcheckCommand) && str_contains($trimmedLine, '\\')) {
$healthcheckCommand .= ' ' . trim($trimmedLine, '\\ ');
$healthcheckCommand .= ' '.trim($trimmedLine, '\\ ');
}
if (isset($healthcheckCommand) && !str_contains($trimmedLine, '\\') && !empty($healthcheckCommand)) {
$healthcheckCommand .= ' ' . $trimmedLine;
if (isset($healthcheckCommand) && ! str_contains($trimmedLine, '\\') && ! empty($healthcheckCommand)) {
$healthcheckCommand .= ' '.$trimmedLine;
break;
}
}

View File

@ -2,6 +2,4 @@
namespace App\Models;
class Kubernetes extends BaseModel
{
}
class Kubernetes extends BaseModel {}

View File

@ -14,9 +14,7 @@ class ContainerRestarted extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public string $name, public Server $server, public ?string $url = null)
{
}
public function __construct(public string $name, public Server $server, public ?string $url = null) {}
public function via(object $notifiable): array
{

View File

@ -14,9 +14,7 @@ class ContainerStopped extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public string $name, public Server $server, public ?string $url = null)
{
}
public function __construct(public string $name, public Server $server, public ?string $url = null) {}
public function via(object $notifiable): array
{

View File

@ -16,9 +16,7 @@ class DailyBackup extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public $databases)
{
}
public function __construct(public $databases) {}
public function via(object $notifiable): array
{

View File

@ -14,9 +14,7 @@ class GeneralNotification extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public string $message)
{
}
public function __construct(public string $message) {}
public function via(object $notifiable): array
{

View File

@ -15,9 +15,7 @@ class DockerCleanup extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public Server $server, public string $message)
{
}
public function __construct(public Server $server, public string $message) {}
public function via(object $notifiable): array
{

View File

@ -17,9 +17,7 @@ class ForceDisabled extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public Server $server)
{
}
public function __construct(public Server $server) {}
public function via(object $notifiable): array
{

View File

@ -17,9 +17,7 @@ class ForceEnabled extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public Server $server)
{
}
public function __construct(public Server $server) {}
public function via(object $notifiable): array
{

View File

@ -17,9 +17,7 @@ class HighDiskUsage extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public Server $server, public int $disk_usage, public int $cleanup_after_percentage)
{
}
public function __construct(public Server $server, public int $disk_usage, public int $cleanup_after_percentage) {}
public function via(object $notifiable): array
{

View File

@ -17,10 +17,7 @@ class Unreachable extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public Server $server)
{
}
public function __construct(public Server $server) {}
public function via(object $notifiable): array
{

View File

@ -13,9 +13,7 @@ class Test extends Notification implements ShouldQueue
public $tries = 5;
public function __construct(public ?string $emails = null)
{
}
public function __construct(public ?string $emails = null) {}
public function via(object $notifiable): array
{

View File

@ -22,9 +22,7 @@ public function via(): array
return [TransactionalEmailChannel::class];
}
public function __construct(public User $user)
{
}
public function __construct(public User $user) {}
public function toMail(): MailMessage
{

View File

@ -14,9 +14,7 @@ class Test extends Notification implements ShouldQueue
public $tries = 5;
public function __construct(public string $emails)
{
}
public function __construct(public string $emails) {}
public function via(): array
{

View File

@ -9,9 +9,7 @@
class AppServiceProvider extends ServiceProvider
{
public function register(): void
{
}
public function register(): void {}
public function boot(): void
{

View File

@ -22,8 +22,7 @@ public function __construct(
public bool $allowToPeak = true,
public bool $isMultiline = false,
public string $defaultClass = 'input',
) {
}
) {}
public function render(): View|Closure|string
{

View File

@ -16,9 +16,7 @@ public function __construct(
public ?string $logo = null,
public ?string $documentation = null,
public bool $upgrade = false,
) {
}
) {}
/**
* Get the view / contents that represent the component.

View File

@ -14,8 +14,7 @@ class Index extends Component
public function __construct(
public $resource = null,
public bool $showRefreshButton = true,
) {
}
) {}
/**
* Get the view / contents that represent the component.

View File

@ -9,7 +9,5 @@ class EnvironmentSeeder extends Seeder
/**
* Run the database seeds.
*/
public function run(): void
{
}
public function run(): void {}
}

View File

@ -37,7 +37,6 @@
Route::get('/servers', [Server::class, 'servers']);
Route::get('/server/{uuid}', [Server::class, 'server_by_uuid']);
Route::get('/resources', [Resources::class, 'resources']);
Route::get('/domains', [Domains::class, 'domains']);
Route::put('/domains', [Domains::class, 'updateDomains']);