diff --git a/app/Console/Commands/Emails.php b/app/Console/Commands/Emails.php index 8ad0d458f..36722564c 100644 --- a/app/Console/Commands/Emails.php +++ b/app/Console/Commands/Emails.php @@ -81,7 +81,7 @@ public function handle() } set_transanctional_email_settings(); - $this->mail = new MailMessage(); + $this->mail = new MailMessage; $this->mail->subject('Test Email'); switch ($type) { case 'updates': @@ -107,7 +107,7 @@ public function handle() $confirmed = confirm('Are you sure?'); if ($confirmed) { foreach ($emails as $email) { - $this->mail = new MailMessage(); + $this->mail = new MailMessage; $this->mail->subject('One-click Services, Docker Compose support'); $unsubscribeUrl = route('unsubscribe.marketing.emails', [ 'token' => encrypt($email), @@ -118,7 +118,7 @@ public function handle() } break; case 'emails-test': - $this->mail = (new Test())->toMail(); + $this->mail = (new Test)->toMail(); $this->sendEmail(); break; case 'database-backup-statuses-daily': @@ -224,7 +224,7 @@ public function handle() // $this->sendEmail(); // break; case 'waitlist-invitation-link': - $this->mail = new MailMessage(); + $this->mail = new MailMessage; $this->mail->view('emails.waitlist-invitation', [ 'loginLink' => 'https://coolify.io', ]); @@ -241,7 +241,7 @@ public function handle() break; case 'realusers-before-trial': - $this->mail = new MailMessage(); + $this->mail = new MailMessage; $this->mail->view('emails.before-trial-conversion'); $this->mail->subject('Trial period has been added for all subscription plans.'); $teams = Team::doesntHave('subscription')->where('id', '!=', 0)->get(); @@ -287,7 +287,7 @@ public function handle() foreach ($admins as $admin) { $this->info($admin); } - $this->mail = new MailMessage(); + $this->mail = new MailMessage; $this->mail->view('emails.server-lost-connection', [ 'name' => $server->name, ]); diff --git a/app/Console/Commands/WaitlistInvite.php b/app/Console/Commands/WaitlistInvite.php index ff501cc1d..2e330068c 100644 --- a/app/Console/Commands/WaitlistInvite.php +++ b/app/Console/Commands/WaitlistInvite.php @@ -103,7 +103,7 @@ private function send_email() { $token = Crypt::encryptString("{$this->next_patient->email}@@@$this->password"); $loginLink = route('auth.link', ['token' => $token]); - $mail = new MailMessage(); + $mail = new MailMessage; $mail->view('emails.waitlist-invitation', [ 'loginLink' => $loginLink, ]); diff --git a/app/Http/Controllers/Api/ApplicationsController.php b/app/Http/Controllers/Api/ApplicationsController.php index e9280a8ad..54ee8ef11 100644 --- a/app/Http/Controllers/Api/ApplicationsController.php +++ b/app/Http/Controllers/Api/ApplicationsController.php @@ -708,7 +708,7 @@ private function create_application(Request $request, $type) if ($return instanceof \Illuminate\Http\JsonResponse) { return $return; } - $application = new Application(); + $application = new Application; removeUnnecessaryFieldsFromRequest($request); $application->fill($request->all()); @@ -796,7 +796,7 @@ private function create_application(Request $request, $type) if (str($gitRepository)->startsWith('http') || str($gitRepository)->contains('github.com')) { $gitRepository = str($gitRepository)->replace('https://', '')->replace('http://', '')->replace('github.com/', ''); } - $application = new Application(); + $application = new Application; removeUnnecessaryFieldsFromRequest($request); $application->fill($request->all()); @@ -890,7 +890,7 @@ private function create_application(Request $request, $type) return response()->json(['message' => 'Private Key not found.'], 404); } - $application = new Application(); + $application = new Application; removeUnnecessaryFieldsFromRequest($request); $application->fill($request->all()); @@ -988,7 +988,7 @@ private function create_application(Request $request, $type) $port = 80; } - $application = new Application(); + $application = new Application; $application->fill($request->all()); $application->fqdn = $fqdn; $application->ports_exposes = $port; @@ -1046,7 +1046,7 @@ private function create_application(Request $request, $type) if (! $request->docker_registry_image_tag) { $request->offsetSet('docker_registry_image_tag', 'latest'); } - $application = new Application(); + $application = new Application; removeUnnecessaryFieldsFromRequest($request); $application->fill($request->all()); @@ -1140,7 +1140,7 @@ private function create_application(Request $request, $type) // return $this->dispatch('error', "Invalid docker-compose file.\n$isValid"); // } - $service = new Service(); + $service = new Service; removeUnnecessaryFieldsFromRequest($request); $service->fill($request->all()); diff --git a/app/Http/Controllers/UploadController.php b/app/Http/Controllers/UploadController.php index 8e52fda32..21fdd2ef8 100644 --- a/app/Http/Controllers/UploadController.php +++ b/app/Http/Controllers/UploadController.php @@ -21,7 +21,7 @@ public function upload(Request $request) $receiver = new FileReceiver('file', $request, HandlerFactory::classFromRequest($request)); if ($receiver->isUploaded() === false) { - throw new UploadMissingFileException(); + throw new UploadMissingFileException; } $save = $receiver->receive(); diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php index b3ca3185f..8a79515b5 100644 --- a/app/Jobs/ApplicationDeploymentJob.php +++ b/app/Jobs/ApplicationDeploymentJob.php @@ -991,7 +991,7 @@ private function laravel_finetunes() $nixpacks_php_root_dir = $this->application->environment_variables_preview->where('key', 'NIXPACKS_PHP_ROOT_DIR')->first(); } if (! $nixpacks_php_fallback_path) { - $nixpacks_php_fallback_path = new EnvironmentVariable(); + $nixpacks_php_fallback_path = new EnvironmentVariable; $nixpacks_php_fallback_path->key = 'NIXPACKS_PHP_FALLBACK_PATH'; $nixpacks_php_fallback_path->value = '/index.php'; $nixpacks_php_fallback_path->is_build_time = false; @@ -999,7 +999,7 @@ private function laravel_finetunes() $nixpacks_php_fallback_path->save(); } if (! $nixpacks_php_root_dir) { - $nixpacks_php_root_dir = new EnvironmentVariable(); + $nixpacks_php_root_dir = new EnvironmentVariable; $nixpacks_php_root_dir->key = 'NIXPACKS_PHP_ROOT_DIR'; $nixpacks_php_root_dir->value = '/app/public'; $nixpacks_php_root_dir->is_build_time = false; @@ -1273,7 +1273,7 @@ private function deploy_to_additional_destinations() continue; } // ray('Deploying to additional destination: ', $server->name); - $deployment_uuid = new Cuid2(); + $deployment_uuid = new Cuid2; queue_application_deployment( deployment_uuid: $deployment_uuid, application: $this->application, diff --git a/app/Jobs/SendConfirmationForWaitlistJob.php b/app/Jobs/SendConfirmationForWaitlistJob.php index 73e8658ee..070598e71 100755 --- a/app/Jobs/SendConfirmationForWaitlistJob.php +++ b/app/Jobs/SendConfirmationForWaitlistJob.php @@ -19,7 +19,7 @@ public function __construct(public string $email, public string $uuid) {} public function handle() { try { - $mail = new MailMessage(); + $mail = new MailMessage; $confirmation_url = base_url().'/webhooks/waitlist/confirm?email='.$this->email.'&confirmation_code='.$this->uuid; $cancel_url = base_url().'/webhooks/waitlist/cancel?email='.$this->email.'&confirmation_code='.$this->uuid; $mail->view('emails.waitlist-confirmation', diff --git a/app/Jobs/SubscriptionInvoiceFailedJob.php b/app/Jobs/SubscriptionInvoiceFailedJob.php index 64a75671f..b4ef7baa0 100755 --- a/app/Jobs/SubscriptionInvoiceFailedJob.php +++ b/app/Jobs/SubscriptionInvoiceFailedJob.php @@ -21,7 +21,7 @@ public function handle() { try { $session = getStripeCustomerPortalSession($this->team); - $mail = new MailMessage(); + $mail = new MailMessage; $mail->view('emails.subscription-invoice-failed', [ 'stripeCustomerPortal' => $session->url, ]); diff --git a/app/Jobs/SubscriptionTrialEndedJob.php b/app/Jobs/SubscriptionTrialEndedJob.php index dd2250dd7..8635b439c 100755 --- a/app/Jobs/SubscriptionTrialEndedJob.php +++ b/app/Jobs/SubscriptionTrialEndedJob.php @@ -23,7 +23,7 @@ public function handle(): void { try { $session = getStripeCustomerPortalSession($this->team); - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject('Action required: You trial in Coolify Cloud ended.'); $mail->view('emails.trial-ended', [ 'stripeCustomerPortal' => $session->url, diff --git a/app/Jobs/SubscriptionTrialEndsSoonJob.php b/app/Jobs/SubscriptionTrialEndsSoonJob.php index 80e232a3e..244624749 100755 --- a/app/Jobs/SubscriptionTrialEndsSoonJob.php +++ b/app/Jobs/SubscriptionTrialEndsSoonJob.php @@ -23,7 +23,7 @@ public function handle(): void { try { $session = getStripeCustomerPortalSession($this->team); - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject('You trial in Coolify Cloud ends soon.'); $mail->view('emails.trial-ends-soon', [ 'stripeCustomerPortal' => $session->url, diff --git a/app/Listeners/MaintenanceModeDisabledNotification.php b/app/Listeners/MaintenanceModeDisabledNotification.php index ded53ccee..c7cd1bcde 100644 --- a/app/Listeners/MaintenanceModeDisabledNotification.php +++ b/app/Listeners/MaintenanceModeDisabledNotification.php @@ -38,7 +38,7 @@ public function handle(EventsMaintenanceModeDisabled $event): void $class = "App\Http\Controllers\Webhook\\".ucfirst(str($endpoint)->before('::')->value()); $method = str($endpoint)->after('::')->value(); try { - $instance = new $class(); + $instance = new $class; $instance->$method($request); } catch (\Throwable $th) { ray($th); diff --git a/app/Livewire/Help.php b/app/Livewire/Help.php index 0289f5f36..d6dc0d521 100644 --- a/app/Livewire/Help.php +++ b/app/Livewire/Help.php @@ -38,7 +38,7 @@ public function submit() $this->rateLimit(3, 30); $this->validate(); $debug = "Route: {$this->path}"; - $mail = new MailMessage(); + $mail = new MailMessage; $mail->view( 'emails.help', [ diff --git a/app/Livewire/Notifications/Discord.php b/app/Livewire/Notifications/Discord.php index f2219bbc6..65c202b7d 100644 --- a/app/Livewire/Notifications/Discord.php +++ b/app/Livewire/Notifications/Discord.php @@ -56,7 +56,7 @@ public function saveModel() public function sendTestNotification() { - $this->team?->notify(new Test()); + $this->team?->notify(new Test); $this->dispatch('success', 'Test notification sent.'); } diff --git a/app/Livewire/Notifications/Telegram.php b/app/Livewire/Notifications/Telegram.php index 16123f123..e163a25e0 100644 --- a/app/Livewire/Notifications/Telegram.php +++ b/app/Livewire/Notifications/Telegram.php @@ -63,7 +63,7 @@ public function saveModel() public function sendTestNotification() { - $this->team?->notify(new Test()); + $this->team?->notify(new Test); $this->dispatch('success', 'Test notification sent.'); } diff --git a/app/Livewire/Project/Shared/EnvironmentVariable/All.php b/app/Livewire/Project/Shared/EnvironmentVariable/All.php index d67dae19e..d1edaf4f5 100644 --- a/app/Livewire/Project/Shared/EnvironmentVariable/All.php +++ b/app/Livewire/Project/Shared/EnvironmentVariable/All.php @@ -137,7 +137,7 @@ public function saveVariables($isPreview) continue; } else { - $environment = new EnvironmentVariable(); + $environment = new EnvironmentVariable; $environment->key = $key; $environment->value = $variable; if (str($environment->value)->startsWith('{{') && str($environment->value)->endsWith('}}')) { @@ -209,7 +209,7 @@ public function submit($data) return; } - $environment = new EnvironmentVariable(); + $environment = new EnvironmentVariable; $environment->key = $data['key']; $environment->value = $data['value']; $environment->is_build_time = $data['is_build_time']; diff --git a/app/Livewire/Project/Shared/ScheduledTask/All.php b/app/Livewire/Project/Shared/ScheduledTask/All.php index 1aa5a2b87..4d8c87dbf 100644 --- a/app/Livewire/Project/Shared/ScheduledTask/All.php +++ b/app/Livewire/Project/Shared/ScheduledTask/All.php @@ -43,7 +43,7 @@ public function refreshTasks() public function submit($data) { try { - $task = new ScheduledTask(); + $task = new ScheduledTask; $task->name = $data['name']; $task->command = $data['command']; $task->frequency = $data['frequency']; diff --git a/app/Livewire/Storage/Create.php b/app/Livewire/Storage/Create.php index 1ccc3997c..a05834ecc 100644 --- a/app/Livewire/Storage/Create.php +++ b/app/Livewire/Storage/Create.php @@ -59,7 +59,7 @@ public function submit() { try { $this->validate(); - $this->storage = new S3Storage(); + $this->storage = new S3Storage; $this->storage->name = $this->name; $this->storage->description = $this->description ?? null; $this->storage->region = $this->region; diff --git a/app/Livewire/Tags/Index.php b/app/Livewire/Tags/Index.php index 2e3fbd8e0..a01d00a70 100644 --- a/app/Livewire/Tags/Index.php +++ b/app/Livewire/Tags/Index.php @@ -51,11 +51,11 @@ public function redeploy_all() { try { $this->applications->each(function ($resource) { - $deploy = new DeployController(); + $deploy = new DeployController; $deploy->deploy_resource($resource); }); $this->services->each(function ($resource) { - $deploy = new DeployController(); + $deploy = new DeployController; $deploy->deploy_resource($resource); }); $this->dispatch('success', 'Mass deployment started.'); diff --git a/app/Livewire/Tags/Show.php b/app/Livewire/Tags/Show.php index ccd190c16..668101edb 100644 --- a/app/Livewire/Tags/Show.php +++ b/app/Livewire/Tags/Show.php @@ -59,11 +59,11 @@ public function redeploy_all() try { $message = collect([]); $this->applications->each(function ($resource) use ($message) { - $deploy = new DeployController(); + $deploy = new DeployController; $message->push($deploy->deploy_resource($resource)); }); $this->services->each(function ($resource) use ($message) { - $deploy = new DeployController(); + $deploy = new DeployController; $message->push($deploy->deploy_resource($resource)); }); $this->dispatch('success', 'Mass deployment started.'); diff --git a/app/Livewire/Team/InviteLink.php b/app/Livewire/Team/InviteLink.php index 0fa9e980c..6c9e405fc 100644 --- a/app/Livewire/Team/InviteLink.php +++ b/app/Livewire/Team/InviteLink.php @@ -79,7 +79,7 @@ private function generate_invite_link(bool $sendEmail = false) 'via' => $sendEmail ? 'email' : 'link', ]); if ($sendEmail) { - $mail = new MailMessage(); + $mail = new MailMessage; $mail->view('emails.invitation-link', [ 'team' => currentTeam()->name, 'invitation_link' => $link, diff --git a/app/Models/Application.php b/app/Models/Application.php index 81fdb5a1e..7b39292e0 100644 --- a/app/Models/Application.php +++ b/app/Models/Application.php @@ -1066,7 +1066,7 @@ public function loadComposeFile($isInit = false) if ($isInit && $this->docker_compose_raw) { return; } - $uuid = new Cuid2(); + $uuid = new Cuid2; ['commands' => $cloneCommand] = $this->generateGitImportCommands(deployment_uuid: $uuid, only_checkout: true, exec_in_docker: false, custom_base_dir: '.'); $workdir = rtrim($this->base_directory, '/'); $composeFile = $this->docker_compose_location; diff --git a/app/Models/EnvironmentVariable.php b/app/Models/EnvironmentVariable.php index 1d2a9dc66..28cf0ef93 100644 --- a/app/Models/EnvironmentVariable.php +++ b/app/Models/EnvironmentVariable.php @@ -52,7 +52,7 @@ protected static function booted() { static::creating(function (Model $model) { if (! $model->uuid) { - $model->uuid = (string) new Cuid2(); + $model->uuid = (string) new Cuid2; } }); static::created(function (EnvironmentVariable $environment_variable) { diff --git a/app/Models/S3Storage.php b/app/Models/S3Storage.php index 278ee5995..4c7faaa6f 100644 --- a/app/Models/S3Storage.php +++ b/app/Models/S3Storage.php @@ -50,7 +50,7 @@ public function testConnection(bool $shouldSave = false) } catch (\Throwable $e) { $this->is_usable = false; if ($this->unusable_email_sent === false && is_transactional_emails_active()) { - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject('Coolify: S3 Storage Connection Error'); $mail->view('emails.s3-connection-error', ['name' => $this->name, 'reason' => $e->getMessage(), 'url' => route('storage.show', ['storage_uuid' => $this->uuid])]); $users = collect([]); diff --git a/app/Models/User.php b/app/Models/User.php index 18d15c0e0..3625b9930 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -120,7 +120,7 @@ public function getRecepients($notification) public function sendVerificationEmail() { - $mail = new MailMessage(); + $mail = new MailMessage; $url = Url::temporarySignedRoute( 'verify.verify', Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)), diff --git a/app/Notifications/Application/DeploymentFailed.php b/app/Notifications/Application/DeploymentFailed.php index a95629087..1809da368 100644 --- a/app/Notifications/Application/DeploymentFailed.php +++ b/app/Notifications/Application/DeploymentFailed.php @@ -53,7 +53,7 @@ public function via(object $notifiable): array public function toMail(): MailMessage { - $mail = new MailMessage(); + $mail = new MailMessage; $pull_request_id = data_get($this->preview, 'pull_request_id', 0); $fqdn = $this->fqdn; if ($pull_request_id === 0) { diff --git a/app/Notifications/Application/DeploymentSuccess.php b/app/Notifications/Application/DeploymentSuccess.php index c06d070d8..5085065c2 100644 --- a/app/Notifications/Application/DeploymentSuccess.php +++ b/app/Notifications/Application/DeploymentSuccess.php @@ -59,7 +59,7 @@ public function via(object $notifiable): array public function toMail(): MailMessage { - $mail = new MailMessage(); + $mail = new MailMessage; $pull_request_id = data_get($this->preview, 'pull_request_id', 0); $fqdn = $this->fqdn; if ($pull_request_id === 0) { diff --git a/app/Notifications/Application/StatusChanged.php b/app/Notifications/Application/StatusChanged.php index 72442fcb3..53ed8a589 100644 --- a/app/Notifications/Application/StatusChanged.php +++ b/app/Notifications/Application/StatusChanged.php @@ -43,7 +43,7 @@ public function via(object $notifiable): array public function toMail(): MailMessage { - $mail = new MailMessage(); + $mail = new MailMessage; $fqdn = $this->fqdn; $mail->subject("Coolify: {$this->resource_name} has been stopped"); $mail->view('emails.application-status-changes', [ diff --git a/app/Notifications/Container/ContainerRestarted.php b/app/Notifications/Container/ContainerRestarted.php index 86c1e6e69..23f6de264 100644 --- a/app/Notifications/Container/ContainerRestarted.php +++ b/app/Notifications/Container/ContainerRestarted.php @@ -23,7 +23,7 @@ public function via(object $notifiable): array public function toMail(): MailMessage { - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject("Coolify: A resource ({$this->name}) has been restarted automatically on {$this->server->name}"); $mail->view('emails.container-restarted', [ 'containerName' => $this->name, diff --git a/app/Notifications/Container/ContainerStopped.php b/app/Notifications/Container/ContainerStopped.php index 75b4872cb..bcf5e67a5 100644 --- a/app/Notifications/Container/ContainerStopped.php +++ b/app/Notifications/Container/ContainerStopped.php @@ -23,7 +23,7 @@ public function via(object $notifiable): array public function toMail(): MailMessage { - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject("Coolify: A resource has been stopped unexpectedly on {$this->server->name}"); $mail->view('emails.container-stopped', [ 'containerName' => $this->name, diff --git a/app/Notifications/Database/BackupFailed.php b/app/Notifications/Database/BackupFailed.php index c6403ab71..77024c05b 100644 --- a/app/Notifications/Database/BackupFailed.php +++ b/app/Notifications/Database/BackupFailed.php @@ -33,7 +33,7 @@ public function via(object $notifiable): array public function toMail(): MailMessage { - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject("Coolify: [ACTION REQUIRED] Backup FAILED for {$this->database->name}"); $mail->view('emails.backup-failed', [ 'name' => $this->name, diff --git a/app/Notifications/Database/BackupSuccess.php b/app/Notifications/Database/BackupSuccess.php index f3a3d5943..f8dc6eb56 100644 --- a/app/Notifications/Database/BackupSuccess.php +++ b/app/Notifications/Database/BackupSuccess.php @@ -33,7 +33,7 @@ public function via(object $notifiable): array public function toMail(): MailMessage { - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject("Coolify: Backup successfully done for {$this->database->name}"); $mail->view('emails.backup-success', [ 'name' => $this->name, diff --git a/app/Notifications/Database/DailyBackup.php b/app/Notifications/Database/DailyBackup.php index 90abee8a6..a51ac6283 100644 --- a/app/Notifications/Database/DailyBackup.php +++ b/app/Notifications/Database/DailyBackup.php @@ -25,7 +25,7 @@ public function via(object $notifiable): array public function toMail(): MailMessage { - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject('Coolify: Daily backup statuses'); $mail->view('emails.daily-backup', [ 'databases' => $this->databases, diff --git a/app/Notifications/ScheduledTask/TaskFailed.php b/app/Notifications/ScheduledTask/TaskFailed.php index 3a41fb687..479cc1aa1 100644 --- a/app/Notifications/ScheduledTask/TaskFailed.php +++ b/app/Notifications/ScheduledTask/TaskFailed.php @@ -35,7 +35,7 @@ public function via(object $notifiable): array public function toMail(): MailMessage { - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject("Coolify: [ACTION REQUIRED] Scheduled task ({$this->task->name}) failed."); $mail->view('emails.scheduled-task-failed', [ 'task' => $this->task, diff --git a/app/Notifications/Server/ForceDisabled.php b/app/Notifications/Server/ForceDisabled.php index 9a76558e2..c0e2a3c31 100644 --- a/app/Notifications/Server/ForceDisabled.php +++ b/app/Notifications/Server/ForceDisabled.php @@ -41,7 +41,7 @@ public function via(object $notifiable): array public function toMail(): MailMessage { - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject("Coolify: Server ({$this->server->name}) disabled because it is not paid!"); $mail->view('emails.server-force-disabled', [ 'name' => $this->server->name, diff --git a/app/Notifications/Server/ForceEnabled.php b/app/Notifications/Server/ForceEnabled.php index a43e30376..83594d643 100644 --- a/app/Notifications/Server/ForceEnabled.php +++ b/app/Notifications/Server/ForceEnabled.php @@ -41,7 +41,7 @@ public function via(object $notifiable): array public function toMail(): MailMessage { - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject("Coolify: Server ({$this->server->name}) enabled again!"); $mail->view('emails.server-force-enabled', [ 'name' => $this->server->name, diff --git a/app/Notifications/Server/HighDiskUsage.php b/app/Notifications/Server/HighDiskUsage.php index a6e248170..3c68afe7b 100644 --- a/app/Notifications/Server/HighDiskUsage.php +++ b/app/Notifications/Server/HighDiskUsage.php @@ -41,7 +41,7 @@ public function via(object $notifiable): array public function toMail(): MailMessage { - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject("Coolify: Server ({$this->server->name}) high disk usage detected!"); $mail->view('emails.high-disk-usage', [ 'name' => $this->server->name, diff --git a/app/Notifications/Server/Revived.php b/app/Notifications/Server/Revived.php index 8eaadf359..e05e13e9b 100644 --- a/app/Notifications/Server/Revived.php +++ b/app/Notifications/Server/Revived.php @@ -50,7 +50,7 @@ public function via(object $notifiable): array public function toMail(): MailMessage { - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject("Coolify: Server ({$this->server->name}) revived."); $mail->view('emails.server-revived', [ 'name' => $this->server->name, diff --git a/app/Notifications/Server/Unreachable.php b/app/Notifications/Server/Unreachable.php index ebbd6af77..f178c9be3 100644 --- a/app/Notifications/Server/Unreachable.php +++ b/app/Notifications/Server/Unreachable.php @@ -41,7 +41,7 @@ public function via(object $notifiable): array public function toMail(): MailMessage { - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject("Coolify: Your server ({$this->server->name}) is unreachable."); $mail->view('emails.server-lost-connection', [ 'name' => $this->server->name, diff --git a/app/Notifications/Test.php b/app/Notifications/Test.php index f873a95d3..3b46a9a24 100644 --- a/app/Notifications/Test.php +++ b/app/Notifications/Test.php @@ -22,7 +22,7 @@ public function via(object $notifiable): array public function toMail(): MailMessage { - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject('Coolify: Test Email'); $mail->view('emails.test'); diff --git a/app/Notifications/TransactionalEmails/InvitationLink.php b/app/Notifications/TransactionalEmails/InvitationLink.php index 49d2ad487..6da2a6fcc 100644 --- a/app/Notifications/TransactionalEmails/InvitationLink.php +++ b/app/Notifications/TransactionalEmails/InvitationLink.php @@ -29,7 +29,7 @@ public function toMail(): MailMessage $invitation = TeamInvitation::whereEmail($this->user->email)->first(); $invitation_team = Team::find($invitation->team->id); - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject('Coolify: Invitation for '.$invitation_team->name); $mail->view('emails.invitation-link', [ 'team' => $invitation_team->name, diff --git a/app/Notifications/TransactionalEmails/ResetPassword.php b/app/Notifications/TransactionalEmails/ResetPassword.php index 8988a4342..8b1c02d39 100644 --- a/app/Notifications/TransactionalEmails/ResetPassword.php +++ b/app/Notifications/TransactionalEmails/ResetPassword.php @@ -53,7 +53,7 @@ public function toMail($notifiable) protected function buildMailMessage($url) { - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject('Coolify: Reset Password'); $mail->view('emails.reset-password', ['url' => $url, 'count' => config('auth.passwords.'.config('auth.defaults.passwords').'.expire')]); diff --git a/app/Notifications/TransactionalEmails/Test.php b/app/Notifications/TransactionalEmails/Test.php index a417e1ee5..64883a58e 100644 --- a/app/Notifications/TransactionalEmails/Test.php +++ b/app/Notifications/TransactionalEmails/Test.php @@ -23,7 +23,7 @@ public function via(): array public function toMail(): MailMessage { - $mail = new MailMessage(); + $mail = new MailMessage; $mail->subject('Coolify: Test Email'); $mail->view('emails.test'); diff --git a/bootstrap/helpers/databases.php b/bootstrap/helpers/databases.php index 089298956..5bfdcce78 100644 --- a/bootstrap/helpers/databases.php +++ b/bootstrap/helpers/databases.php @@ -25,7 +25,7 @@ function create_standalone_postgresql($environmentId, $destinationUuid, ?array $ if (! $destination) { throw new Exception('Destination not found'); } - $database = new StandalonePostgresql(); + $database = new StandalonePostgresql; $database->name = generate_database_name('postgresql'); $database->postgres_password = \Illuminate\Support\Str::password(length: 64, symbols: false); $database->environment_id = $environmentId; @@ -45,7 +45,7 @@ function create_standalone_redis($environment_id, $destination_uuid, ?array $oth if (! $destination) { throw new Exception('Destination not found'); } - $database = new StandaloneRedis(); + $database = new StandaloneRedis; $database->name = generate_database_name('redis'); $database->redis_password = \Illuminate\Support\Str::password(length: 64, symbols: false); $database->environment_id = $environment_id; @@ -65,7 +65,7 @@ function create_standalone_mongodb($environment_id, $destination_uuid, ?array $o if (! $destination) { throw new Exception('Destination not found'); } - $database = new StandaloneMongodb(); + $database = new StandaloneMongodb; $database->name = generate_database_name('mongodb'); $database->mongo_initdb_root_password = \Illuminate\Support\Str::password(length: 64, symbols: false); $database->environment_id = $environment_id; @@ -84,7 +84,7 @@ function create_standalone_mysql($environment_id, $destination_uuid, ?array $oth if (! $destination) { throw new Exception('Destination not found'); } - $database = new StandaloneMysql(); + $database = new StandaloneMysql; $database->name = generate_database_name('mysql'); $database->mysql_root_password = \Illuminate\Support\Str::password(length: 64, symbols: false); $database->mysql_password = \Illuminate\Support\Str::password(length: 64, symbols: false); @@ -104,7 +104,7 @@ function create_standalone_mariadb($environment_id, $destination_uuid, ?array $o if (! $destination) { throw new Exception('Destination not found'); } - $database = new StandaloneMariadb(); + $database = new StandaloneMariadb; $database->name = generate_database_name('mariadb'); $database->mariadb_root_password = \Illuminate\Support\Str::password(length: 64, symbols: false); $database->mariadb_password = \Illuminate\Support\Str::password(length: 64, symbols: false); @@ -125,7 +125,7 @@ function create_standalone_keydb($environment_id, $destination_uuid, ?array $oth if (! $destination) { throw new Exception('Destination not found'); } - $database = new StandaloneKeydb(); + $database = new StandaloneKeydb; $database->name = generate_database_name('keydb'); $database->keydb_password = \Illuminate\Support\Str::password(length: 64, symbols: false); $database->environment_id = $environment_id; @@ -145,7 +145,7 @@ function create_standalone_dragonfly($environment_id, $destination_uuid, ?array if (! $destination) { throw new Exception('Destination not found'); } - $database = new StandaloneDragonfly(); + $database = new StandaloneDragonfly; $database->name = generate_database_name('dragonfly'); $database->dragonfly_password = \Illuminate\Support\Str::password(length: 64, symbols: false); $database->environment_id = $environment_id; @@ -164,7 +164,7 @@ function create_standalone_clickhouse($environment_id, $destination_uuid, ?array if (! $destination) { throw new Exception('Destination not found'); } - $database = new StandaloneClickhouse(); + $database = new StandaloneClickhouse; $database->name = generate_database_name('clickhouse'); $database->clickhouse_admin_password = \Illuminate\Support\Str::password(length: 64, symbols: false); $database->environment_id = $environment_id; diff --git a/bootstrap/helpers/github.php b/bootstrap/helpers/github.php index 98e405c74..97deb0b1c 100644 --- a/bootstrap/helpers/github.php +++ b/bootstrap/helpers/github.php @@ -14,9 +14,9 @@ function generate_github_installation_token(GithubApp $source) { $signingKey = InMemory::plainText($source->privateKey->private_key); - $algorithm = new Sha256(); - $tokenBuilder = (new Builder(new JoseEncoder(), ChainedFormatter::default())); - $now = new DateTimeImmutable(); + $algorithm = new Sha256; + $tokenBuilder = (new Builder(new JoseEncoder, ChainedFormatter::default())); + $now = new DateTimeImmutable; $now = $now->setTime($now->format('H'), $now->format('i')); $issuedToken = $tokenBuilder ->issuedBy($source->app_id) @@ -38,9 +38,9 @@ function generate_github_installation_token(GithubApp $source) function generate_github_jwt_token(GithubApp $source) { $signingKey = InMemory::plainText($source->privateKey->private_key); - $algorithm = new Sha256(); - $tokenBuilder = (new Builder(new JoseEncoder(), ChainedFormatter::default())); - $now = new DateTimeImmutable(); + $algorithm = new Sha256; + $tokenBuilder = (new Builder(new JoseEncoder, ChainedFormatter::default())); + $now = new DateTimeImmutable; $now = $now->setTime($now->format('H'), $now->format('i')); $issuedToken = $tokenBuilder ->issuedBy($source->app_id) diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index 7ae2b0309..2959e6d21 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -196,7 +196,7 @@ function generate_random_name(?string $cuid = null): string { $generator = new \Nubs\RandomNameGenerator\All( [ - new \Nubs\RandomNameGenerator\Alliteration(), + new \Nubs\RandomNameGenerator\Alliteration, ] ); if (is_null($cuid)) { @@ -2188,9 +2188,9 @@ function generateEnvValue(string $command, ?Service $service = null) $signingKey = $signingKey->value; } $key = InMemory::plainText($signingKey); - $algorithm = new Sha256(); - $tokenBuilder = (new Builder(new JoseEncoder(), ChainedFormatter::default())); - $now = new DateTimeImmutable(); + $algorithm = new Sha256; + $tokenBuilder = (new Builder(new JoseEncoder, ChainedFormatter::default())); + $now = new DateTimeImmutable; $now = $now->setTime($now->format('H'), $now->format('i')); $token = $tokenBuilder ->issuedBy('supabase') @@ -2208,9 +2208,9 @@ function generateEnvValue(string $command, ?Service $service = null) $signingKey = $signingKey->value; } $key = InMemory::plainText($signingKey); - $algorithm = new Sha256(); - $tokenBuilder = (new Builder(new JoseEncoder(), ChainedFormatter::default())); - $now = new DateTimeImmutable(); + $algorithm = new Sha256; + $tokenBuilder = (new Builder(new JoseEncoder, ChainedFormatter::default())); + $now = new DateTimeImmutable; $now = $now->setTime($now->format('H'), $now->format('i')); $token = $tokenBuilder ->issuedBy('supabase') diff --git a/database/migrations/2024_06_25_184323_update_db.php b/database/migrations/2024_06_25_184323_update_db.php index 005e063cc..f1b175a9c 100644 --- a/database/migrations/2024_06_25_184323_update_db.php +++ b/database/migrations/2024_06_25_184323_update_db.php @@ -38,7 +38,7 @@ public function up(): void EnvironmentVariable::all()->each(function (EnvironmentVariable $environmentVariable) { $environmentVariable->update([ - 'uuid' => (string) new Cuid2(), + 'uuid' => (string) new Cuid2, ]); }); Schema::table('environment_variables', function (Blueprint $table) { diff --git a/database/seeders/ProductionSeeder.php b/database/seeders/ProductionSeeder.php index 5db2e826c..e030c0ae6 100644 --- a/database/seeders/ProductionSeeder.php +++ b/database/seeders/ProductionSeeder.php @@ -178,7 +178,7 @@ public function run(): void get_public_ips(); - $oauth_settings_seeder = new OauthSettingSeeder(); + $oauth_settings_seeder = new OauthSettingSeeder; $oauth_settings_seeder->run(); } }