diff --git a/app/CaddyfilePatcher.php b/app/CaddyfilePatcher.php index 4e4fe34..2c26efc 100644 --- a/app/CaddyfilePatcher.php +++ b/app/CaddyfilePatcher.php @@ -70,7 +70,7 @@ public function replacePort(int $newPort): self /** * Replaces the TLS snippet for the site with a new one. */ - public function replaceTlsSnippet(TlsSetting $newTlsSetting, ?Certificate $certificate = null): self + public function replaceTlsSnippet(TlsSetting $newTlsSetting, Certificate $certificate = null): self { $lines = explode(PHP_EOL, $this->caddyfile); diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 5775948..4c6d12d 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -33,7 +33,7 @@ protected function team(): Team /** * Log an activity. */ - public function logActivity(string $description, ?Model $subject = null): ActivityLog + public function logActivity(string $description, Model $subject = null): ActivityLog { return ActivityLog::create([ 'team_id' => $this->team()->id, diff --git a/app/Infrastructure/Entities/ServerType.php b/app/Infrastructure/Entities/ServerType.php index d071e78..eb6908f 100644 --- a/app/Infrastructure/Entities/ServerType.php +++ b/app/Infrastructure/Entities/ServerType.php @@ -15,8 +15,8 @@ public function __construct( public readonly int $cpuCores, public readonly int $memoryInMb, public readonly int $storageInGb, - public readonly null|int $monthlyPriceAmount = null, - public readonly null|string $monthlyPriceCurrency = null, + public readonly ?int $monthlyPriceAmount = null, + public readonly ?string $monthlyPriceCurrency = null, ) { $memoryInGb = $this->memoryInMb / 1024; diff --git a/app/Models/ServerTaskDispatcher.php b/app/Models/ServerTaskDispatcher.php index 132ad53..7e6e14a 100644 --- a/app/Models/ServerTaskDispatcher.php +++ b/app/Models/ServerTaskDispatcher.php @@ -175,7 +175,7 @@ private function dispatchAndKeepTrack(): TaskModel /** * Dispatches the pending task. */ - private function dispatchPendingTask(): ProcessOutput|null + private function dispatchPendingTask(): ?ProcessOutput { try { $processOutput = $this->pendingTask->dispatch(); diff --git a/app/Models/Site.php b/app/Models/Site.php index 3e67e6a..ee5920f 100644 --- a/app/Models/Site.php +++ b/app/Models/Site.php @@ -239,7 +239,7 @@ public function deploy(array $environmentVariables = [], User $user = null): Dep /** * Updates the site's Caddyfile with the given PHP version and web folder. */ - public function updateCaddyfile(PhpVersion $phpVersion, string $webFolder, ?User $user = null): void + public function updateCaddyfile(PhpVersion $phpVersion, string $webFolder, User $user = null): void { $this->pending_caddyfile_update_since = now(); $this->save(); diff --git a/app/Models/Team.php b/app/Models/Team.php index 78dfe3c..e6d95aa 100644 --- a/app/Models/Team.php +++ b/app/Models/Team.php @@ -68,7 +68,7 @@ public function subscriptionOptions(): TeamSubscriptionOptions /** * Get the email address that should be associated with the Paddle customer. */ - public function paddleEmail(): string|null + public function paddleEmail(): ?string { /** @var User */ $owner = $this->owner; diff --git a/app/Tasks/Task.php b/app/Tasks/Task.php index 5cd86b8..adb6e94 100644 --- a/app/Tasks/Task.php +++ b/app/Tasks/Task.php @@ -24,7 +24,7 @@ public function onOutputUpdated(string $output): void { } - public function callbackUrl(): string|null + public function callbackUrl(): ?string { return $this instanceof HasCallbacks ? $this->taskModel?->callbackUrl() : null; }