diff --git a/app/Console/Commands/User/MakeUserCommand.php b/app/Console/Commands/User/MakeUserCommand.php index 4751e0d317..8f29483b3d 100644 --- a/app/Console/Commands/User/MakeUserCommand.php +++ b/app/Console/Commands/User/MakeUserCommand.php @@ -57,5 +57,7 @@ public function handle(): int ['Name', $user->name], ['Admin', $user->root_admin ? 'Yes' : 'No'], ]); + + return 0; } } diff --git a/app/Services/Backups/InitiateBackupService.php b/app/Services/Backups/InitiateBackupService.php index 0b89a3a9bb..447c575359 100644 --- a/app/Services/Backups/InitiateBackupService.php +++ b/app/Services/Backups/InitiateBackupService.php @@ -3,7 +3,6 @@ namespace App\Services\Backups; use Ramsey\Uuid\Uuid; -use Carbon\CarbonImmutable; use Webmozart\Assert\Assert; use App\Models\Backup; use App\Models\Server; @@ -86,7 +85,7 @@ public function handle(Server $server, string $name = null, bool $override = fal if ($previous->count() >= $limit) { $message = sprintf('Only %d backups may be generated within a %d second span of time.', $limit, $period); - throw new TooManyRequestsHttpException(CarbonImmutable::now()->diffInSeconds($previous->last()->created_at->addSeconds($period)), $message); + throw new TooManyRequestsHttpException((int) now()->diffInSeconds($previous->last()->created_at->addSeconds($period)), $message); } } @@ -115,7 +114,7 @@ public function handle(Server $server, string $name = null, bool $override = fal $backup = Backup::query()->create([ 'server_id' => $server->id, 'uuid' => Uuid::uuid4()->toString(), - 'name' => trim($name) ?: sprintf('Backup at %s', CarbonImmutable::now()->toDateTimeString()), + 'name' => trim($name) ?: sprintf('Backup at %s', now()->toDateTimeString()), 'ignored_files' => array_values($this->ignoredFiles ?? []), 'disk' => $this->backupManager->getDefaultAdapter(), 'is_locked' => $this->isLocked, diff --git a/app/Transformers/Api/Client/ActivityLogTransformer.php b/app/Transformers/Api/Client/ActivityLogTransformer.php index e0f3391668..af666beb69 100644 --- a/app/Transformers/Api/Client/ActivityLogTransformer.php +++ b/app/Transformers/Api/Client/ActivityLogTransformer.php @@ -55,7 +55,7 @@ protected function properties(ActivityLog $model): object $properties = $model->properties ->mapWithKeys(function ($value, $key) use ($model) { - if ($key === 'ip' && !$model->actor?->is($this->request->user())) { + if ($key === 'ip' && !$model->actor->is($this->request->user())) { return [$key => '[hidden]']; }