Skip to content

Commit

Permalink
Get rid of many useless blank lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmichot committed Oct 31, 2024
1 parent e420c33 commit aaf46a9
Show file tree
Hide file tree
Showing 72 changed files with 0 additions and 103 deletions.
1 change: 0 additions & 1 deletion app/Actions/CoolifyTask/RunRemoteProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class RunRemoteProcess
*/
public function __construct(Activity $activity, bool $hide_from_output = false, bool $ignore_errors = false, $call_event_on_finish = null, $call_event_data = null)
{

if ($activity->getExtraProperty('type') !== ActivityTypes::INLINE->value && $activity->getExtraProperty('type') !== ActivityTypes::COMMAND->value) {
throw new \RuntimeException('Incompatible Activity to run a remote command.');
}
Expand Down
1 change: 0 additions & 1 deletion app/Actions/Proxy/StartProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,5 @@ public function handle(Server $server, bool $async = true, bool $force = false):

return 'OK';
}

}
}
1 change: 0 additions & 1 deletion app/Actions/Server/ConfigureCloudflared.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public function handle(Server $server, string $cloudflare_token)
'rm -fr /tmp/cloudflared',
]);
instant_remote_process($commands, $server);

}
}
}
1 change: 0 additions & 1 deletion app/Console/Commands/CleanupDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,5 @@ public function handle()
if ($this->option('yes')) {
$webhooks->delete();
}

}
}
1 change: 0 additions & 1 deletion app/Console/Commands/CleanupRedis.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ public function handle()
collect($queueOverlaps)->each(function ($key) {
Redis::connection()->del($key);
});

}
}
1 change: 0 additions & 1 deletion app/Console/Commands/CleanupStuckedResources.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public function handle()

private function cleanup_stucked_resources()
{

try {
$servers = Server::all()->filter(function ($server) {
return $server->isFunctional();
Expand Down
2 changes: 0 additions & 2 deletions app/Console/Commands/CloudCleanupSubscriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public function handle()
}
}
}

} catch (\Exception $e) {
$this->error($e->getMessage());

Expand All @@ -95,6 +94,5 @@ private function disableServers(Team $team)
]);
}
}

}
}
1 change: 0 additions & 1 deletion app/Console/Commands/Dev.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public function handle()

return;
}

}

public function generateOpenApi()
Expand Down
2 changes: 0 additions & 2 deletions app/Console/Commands/Init.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public function handle()

$this->servers = Server::all();
if (isCloud()) {

} else {
$this->send_alive_signal();
get_public_ips();
Expand Down Expand Up @@ -120,7 +119,6 @@ private function cleanup_unnecessary_dynamic_proxy_configuration()
} catch (\Throwable $e) {
echo "Error in cleaning up unnecessary dynamic proxy configuration: {$e->getMessage()}\n";
}

}
}

Expand Down
1 change: 0 additions & 1 deletion app/Console/Commands/OpenApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ public function handle()
$error = preg_replace('/^\h*\v+/m', '', $error);
echo $error;
echo $process->output();

}
}
8 changes: 0 additions & 8 deletions app/Http/Controllers/Api/ApplicationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,6 @@ private function create_application(Request $request, $type)
}

return response()->json(['message' => 'Invalid type.'], 400);

}

#[OA\Get(
Expand Down Expand Up @@ -1869,18 +1868,15 @@ public function update_env_by_uuid(Request $request)

return response()->json($this->removeSensitiveData($env))->setStatusCode(201);
} else {

return response()->json([
'message' => 'Environment variable not found.',
], 404);

}
}

return response()->json([
'message' => 'Something is not okay. Are you okay?',
], 500);

}

#[OA\Patch(
Expand Down Expand Up @@ -2225,14 +2221,12 @@ public function create_env(Request $request)
return response()->json([
'uuid' => $env->uuid,
])->setStatusCode(201);

}
}

return response()->json([
'message' => 'Something went wrong.',
], 500);

}

#[OA\Delete(
Expand Down Expand Up @@ -2580,7 +2574,6 @@ public function action_restart(Request $request)
'deployment_uuid' => $deployment_uuid->toString(),
],
);

}

#[OA\Post(
Expand Down Expand Up @@ -2746,7 +2739,6 @@ private function validateDataApplications(Request $request, Server $server)
'custom_labels' => 'The custom_labels should be base64 encoded.',
],
], 422);

}
}
if ($request->has('domains') && $server->isProxyShouldRun()) {
Expand Down
4 changes: 0 additions & 4 deletions app/Http/Controllers/Api/DatabasesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ public function update_by_uuid(Request $request)
$request->offsetSet('mysql_conf', $mysqlConf);
}
break;

}
$extraFields = array_diff(array_keys($request->all()), $allowedFields);
if ($validator->fails() || ! empty($extraFields)) {
Expand Down Expand Up @@ -506,7 +505,6 @@ public function update_by_uuid(Request $request)
return response()->json([
'message' => 'Database updated.',
]);

}

#[OA\Post(
Expand Down Expand Up @@ -1165,7 +1163,6 @@ public function create_database(Request $request, NewDatabaseTypes $type)
}

return response()->json(serializeApiResponse($payload))->setStatusCode(201);

} elseif ($type === NewDatabaseTypes::MARIADB) {
$allowedFields = ['name', 'description', 'image', 'public_port', 'is_public', 'project_uuid', 'environment_name', 'server_uuid', 'destination_uuid', 'instant_deploy', 'limits_memory', 'limits_memory_swap', 'limits_memory_swappiness', 'limits_memory_reservation', 'limits_cpus', 'limits_cpuset', 'limits_cpu_shares', 'mariadb_conf', 'mariadb_root_password', 'mariadb_user', 'mariadb_password', 'mariadb_database'];
$validator = customApiValidator($request->all(), [
Expand Down Expand Up @@ -1826,6 +1823,5 @@ public function action_restart(Request $request)
],
200
);

}
}
1 change: 0 additions & 1 deletion app/Http/Controllers/Api/ProjectController.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ public function update_project(Request $request)
'name' => $project->name,
'description' => $project->description,
])->setStatusCode(201);

}

#[OA\Delete(
Expand Down
1 change: 0 additions & 1 deletion app/Http/Controllers/Api/ServicesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,5 @@ public function action_restart(Request $request)
],
200
);

}
}
1 change: 0 additions & 1 deletion app/Http/Controllers/Webhook/Gitea.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ public function manual(Request $request)
'pull_request_html_url' => $pull_request_html_url,
]);
}

}
queue_application_deployment(
application: $application,
Expand Down
1 change: 0 additions & 1 deletion app/Jobs/CheckHelperImageJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public function handle(): void
$settings->update(['helper_version' => $latest_version]);
}
}

} catch (\Throwable $e) {
send_internal_notification('CheckHelperImageJob failed with: '.$e->getMessage());
throw $e;
Expand Down
1 change: 0 additions & 1 deletion app/Jobs/DatabaseBackupJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ public function handle(): void
if ($this->postgres_password) {
$this->postgres_password = str($this->postgres_password)->after('POSTGRES_PASSWORD=')->value();
}

} elseif (str($databaseType)->contains('mysql')) {
$this->container_name = "{$this->database->name}-$serviceUuid";
$this->directory_name = $serviceName.'-'.$this->container_name;
Expand Down
2 changes: 0 additions & 2 deletions app/Jobs/PushServerUpdateJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ public function handle()
$this->foundServiceDatabaseIds->push($subId);
$this->updateServiceSubStatus($serviceId, $subType, $subId, $containerStatus);
}

} else {
$uuid = $labels->get('com.docker.compose.service');
$type = $labels->get('coolify.type');
Expand Down Expand Up @@ -265,7 +264,6 @@ private function updateProxyStatus()
instant_remote_process($connectProxyToDockerNetworks, $this->server, false);
}
}

}

private function updateDatabaseStatus(string $databaseUuid, string $containerStatus, bool $tcpProxy = false)
Expand Down
1 change: 0 additions & 1 deletion app/Jobs/ScheduledTaskJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ private function getServerTimezone(): string

public function handle(): void
{

try {
$this->task_log = ScheduledTaskExecution::create([
'scheduled_task_id' => $this->task->id,
Expand Down
2 changes: 0 additions & 2 deletions app/Jobs/ServerCheckJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,9 @@ public function handle()
}
}
}

} catch (\Throwable $e) {
return handleError($e);
}

}

private function checkLogDrainContainer()
Expand Down
2 changes: 0 additions & 2 deletions app/Jobs/ServerCleanupMux.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ public function handle()
return 'Server is not reachable or not ready.';
}
SshMultiplexingHelper::removeMuxFile($this->server);

} catch (\Throwable $e) {
return handleError($e);
}

}
}
2 changes: 0 additions & 2 deletions app/Jobs/ServerStorageCheckJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ function () use ($team, $serverDiskUsageNotificationThreshold) {
} else {
RateLimiter::hit('high-disk-usage:'.$this->server->id, 600);
}

} catch (\Throwable $e) {
return handleError($e);
}

}
}
1 change: 0 additions & 1 deletion app/Jobs/UpdateCoolifyJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public function handle(): void

$settings->update(['new_version_available' => false]);
Log::info('Coolify update completed successfully.');

} catch (\Throwable $e) {
Log::error('UpdateCoolifyJob failed: '.$e->getMessage());
// Consider implementing a notification to administrators
Expand Down
1 change: 0 additions & 1 deletion app/Livewire/Project/Database/Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public function getContainers()

public function runImport()
{

if ($this->filename == '') {
$this->dispatch('error', 'Please select a file to import.');

Expand Down
1 change: 0 additions & 1 deletion app/Livewire/Project/Database/Keydb/General.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public function mount()
$this->db_url = $this->database->internal_db_url;
$this->db_url_public = $this->database->external_db_url;
$this->server = data_get($this->database, 'destination.server');

}

public function instantSaveAdvanced()
Expand Down
1 change: 0 additions & 1 deletion app/Livewire/Project/Database/Mariadb/General.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public function mount()
$this->db_url = $this->database->internal_db_url;
$this->db_url_public = $this->database->external_db_url;
$this->server = data_get($this->database, 'destination.server');

}

public function instantSaveAdvanced()
Expand Down
1 change: 0 additions & 1 deletion app/Livewire/Project/Database/Mongodb/General.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ public function mount()
$this->db_url = $this->database->internal_db_url;
$this->db_url_public = $this->database->external_db_url;
$this->server = data_get($this->database, 'destination.server');

}

public function instantSaveAdvanced()
Expand Down
1 change: 0 additions & 1 deletion app/Livewire/Project/New/PublicGitRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ public function updatedBaseDirectory()
$this->base_directory = '/'.$this->base_directory;
}
}

}

public function updatedDockerComposeLocation()
Expand Down
1 change: 0 additions & 1 deletion app/Livewire/Project/Resource/Create.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ public function mount()
'is_preview' => false,
]);
}

});
}
$service->parse(isNew: true);
Expand Down
1 change: 0 additions & 1 deletion app/Livewire/Project/Service/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public function mount()
} catch (\Throwable $e) {
return handleError($e, $this);
}

}

public function generateDockerCompose()
Expand Down
3 changes: 0 additions & 3 deletions app/Livewire/Project/Shared/ExecuteContainerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ public function loadContainers()
}
});
}

}
if ($this->containers->count() > 0) {
$this->container = $this->containers->first();
Expand All @@ -155,7 +154,6 @@ public function connectToServer()
data_get($this->server, 'name'),
data_get($this->server, 'uuid')
);

} catch (\Throwable $e) {
return handleError($e, $this);
}
Expand Down Expand Up @@ -185,7 +183,6 @@ public function connectToContainer()
data_get($container, 'container.Names'),
data_get($container, 'server.uuid')
);

} catch (\Throwable $e) {
return handleError($e, $this);
}
Expand Down
2 changes: 0 additions & 2 deletions app/Livewire/Project/Shared/Logs.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ public function mount()
$this->containers = $this->containers->filter(function ($container) {
return str_contains($container, $this->query['pull_request_id']);
});

}

} catch (\Exception $e) {
return handleError($e, $this);
}
Expand Down
1 change: 0 additions & 1 deletion app/Livewire/Project/Shared/ResourceOperations.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ public function cloneTo($destination_id)

return redirect()->to($route);
}

}

public function moveTo($environment_id)
Expand Down
Loading

0 comments on commit aaf46a9

Please sign in to comment.