From c628bc59f689fad2b8ee89160075b6e072f62701 Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Fri, 18 Oct 2024 14:57:16 +0100 Subject: [PATCH] feedback + tidy up --- src/Commands/InstallCommand.php | 7 +++---- src/Settings/Attributes/Description.php | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Commands/InstallCommand.php b/src/Commands/InstallCommand.php index d980d9d2..a64a01e4 100644 --- a/src/Commands/InstallCommand.php +++ b/src/Commands/InstallCommand.php @@ -9,7 +9,6 @@ use Illuminate\Support\Facades\File; use Illuminate\Support\Sleep; use Illuminate\Support\Str; -use Laravel\Prompts\Prompt; use ReflectionClass; use ReflectionProperty; use function Laravel\Prompts\confirm; @@ -24,7 +23,7 @@ class InstallCommand extends Command protected $description = 'Install Cachet'; - public function handle(AppSettings $settings) + public function handle(AppSettings $settings): int { intro('Welcome to the Cachet installer!'); @@ -123,8 +122,8 @@ protected function configureDatabaseSettings(AppSettings $settings): AppSettings } $descriptionAttributeClass = $descriptionAttribute[0]->newInstance(); - $default = $descriptionAttributeClass->getDefault(); - $required = $descriptionAttributeClass->getRequired(); + $default = $descriptionAttributeClass->default(); + $required = $descriptionAttributeClass->required(); if ($required === false) { return; diff --git a/src/Settings/Attributes/Description.php b/src/Settings/Attributes/Description.php index 6f9ad157..39134bca 100644 --- a/src/Settings/Attributes/Description.php +++ b/src/Settings/Attributes/Description.php @@ -9,12 +9,12 @@ final class Description { public function __construct(private readonly string $default, private readonly bool $required = true) {} - public function getDefault(): string + public function default(): string { return $this->default; } - public function getRequired(): bool + public function required(): bool { return $this->required; }