refactoring
This commit is contained in:
parent
2d8f3b4e79
commit
417093ae9b
|
@ -25,13 +25,13 @@ class AuthLoginCommand extends Command
|
||||||
$client = new Client();
|
$client = new Client();
|
||||||
|
|
||||||
if ($configLoader->configExists()) {
|
if ($configLoader->configExists()) {
|
||||||
$continue = $dialog->ask(
|
$continue = $dialog->askConfirmation(
|
||||||
$output,
|
$output,
|
||||||
'The configuration file already exists. Do you want to continue? (y/n, default: y) ',
|
'<info>The configuration file already exists</info>. Do you want to continue? [yes] ',
|
||||||
'y'
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!in_array($continue, ['y', 'yes'])) {
|
if (!$continue) {
|
||||||
$output->writeln('Aborded.');
|
$output->writeln('Aborded.');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -39,7 +39,7 @@ class AuthLoginCommand extends Command
|
||||||
}
|
}
|
||||||
|
|
||||||
$username = $dialog->ask($output, 'Username: ', null);
|
$username = $dialog->ask($output, 'Username: ', null);
|
||||||
$password = $dialog->ask($output, 'Password: ', null);
|
$password = $dialog->askHiddenResponse($output, 'Password (hidden): ', null);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$response = $client->getAuthorization($username, $password);
|
$response = $client->getAuthorization($username, $password);
|
||||||
|
|
Loading…
Reference in a new issue