diff --git a/src/Console/Commands/ContributorCommand.php b/src/Console/Commands/ContributorCommand.php index 940e0e4..8e4df69 100644 --- a/src/Console/Commands/ContributorCommand.php +++ b/src/Console/Commands/ContributorCommand.php @@ -54,10 +54,10 @@ protected function interact(InputInterface $input, OutputInterface $output): voi $input->setArgument('role', select( label: 'What role should the contributor have?', options: [ - RoleEnum::owner->value => RoleEnum::owner->label(), - RoleEnum::translator->value => RoleEnum::translator->label(), + RoleEnum::owner->label() => RoleEnum::owner->label(), + RoleEnum::translator->label() => RoleEnum::translator->label(), ], - default: 'Owner', + default: RoleEnum::owner->label(), hint: 'The role may be changed at any time.' )); } @@ -86,7 +86,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int fn () => Contributor::create([ 'name' => $name, 'email' => $email, - 'role' => RoleEnum::fromLabel($role) ?? RoleEnum::owner->value, + 'role' => RoleEnum::fromLabel($role), 'password' => Hash::make($password), ]), 'Creating contributor...'