Skip to content

Commit

Permalink
feedback + tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexJump24 committed Oct 18, 2024
1 parent 0305ec8 commit 44bb282
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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!');

Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/Settings/Attributes/Description.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 44bb282

Please sign in to comment.