mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-23 21:27:44 +03:00
Improved if statements reducing indentation
This commit is contained in:
parent
23922f6c7b
commit
c05aeabdee
3 changed files with 12 additions and 21 deletions
|
@ -24,13 +24,10 @@ class ApplicationConfigCustomizerPlugin extends AbstractConfigCustomizerPlugin
|
|||
{
|
||||
$this->printTitle($output, 'APPLICATION');
|
||||
|
||||
if ($appConfig->hasApp()) {
|
||||
$keepConfig = $this->questionHelper->ask($input, $output, new ConfirmationQuestion(
|
||||
'<question>Do you want to keep imported application config? (Y/n):</question> '
|
||||
));
|
||||
if ($keepConfig) {
|
||||
return;
|
||||
}
|
||||
if ($appConfig->hasApp() && $this->questionHelper->ask($input, $output, new ConfirmationQuestion(
|
||||
'<question>Do you want to keep imported application config? (Y/n):</question> '
|
||||
))) {
|
||||
return;
|
||||
}
|
||||
|
||||
$appConfig->setApp([
|
||||
|
|
|
@ -25,13 +25,10 @@ class LanguageConfigCustomizerPlugin extends AbstractConfigCustomizerPlugin
|
|||
{
|
||||
$this->printTitle($output, 'LANGUAGE');
|
||||
|
||||
if ($appConfig->hasLanguage()) {
|
||||
$keepConfig = $this->questionHelper->ask($input, $output, new ConfirmationQuestion(
|
||||
'<question>Do you want to keep imported language? (Y/n):</question> '
|
||||
));
|
||||
if ($keepConfig) {
|
||||
return;
|
||||
}
|
||||
if ($appConfig->hasLanguage() && $this->questionHelper->ask($input, $output, new ConfirmationQuestion(
|
||||
'<question>Do you want to keep imported language? (Y/n):</question> '
|
||||
))) {
|
||||
return;
|
||||
}
|
||||
|
||||
$appConfig->setLanguage([
|
||||
|
|
|
@ -24,13 +24,10 @@ class UrlShortenerConfigCustomizerPlugin extends AbstractConfigCustomizerPlugin
|
|||
{
|
||||
$this->printTitle($output, 'URL SHORTENER');
|
||||
|
||||
if ($appConfig->hasUrlShortener()) {
|
||||
$keepConfig = $this->questionHelper->ask($input, $output, new ConfirmationQuestion(
|
||||
'<question>Do you want to keep imported URL shortener config? (Y/n):</question> '
|
||||
));
|
||||
if ($keepConfig) {
|
||||
return;
|
||||
}
|
||||
if ($appConfig->hasUrlShortener() && $this->questionHelper->ask($input, $output, new ConfirmationQuestion(
|
||||
'<question>Do you want to keep imported URL shortener config? (Y/n):</question> '
|
||||
))) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Ask for URL shortener params
|
||||
|
|
Loading…
Reference in a new issue