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');
|
$this->printTitle($output, 'APPLICATION');
|
||||||
|
|
||||||
if ($appConfig->hasApp()) {
|
if ($appConfig->hasApp() && $this->questionHelper->ask($input, $output, new ConfirmationQuestion(
|
||||||
$keepConfig = $this->questionHelper->ask($input, $output, new ConfirmationQuestion(
|
'<question>Do you want to keep imported application config? (Y/n):</question> '
|
||||||
'<question>Do you want to keep imported application config? (Y/n):</question> '
|
))) {
|
||||||
));
|
return;
|
||||||
if ($keepConfig) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$appConfig->setApp([
|
$appConfig->setApp([
|
||||||
|
|
|
@ -25,13 +25,10 @@ class LanguageConfigCustomizerPlugin extends AbstractConfigCustomizerPlugin
|
||||||
{
|
{
|
||||||
$this->printTitle($output, 'LANGUAGE');
|
$this->printTitle($output, 'LANGUAGE');
|
||||||
|
|
||||||
if ($appConfig->hasLanguage()) {
|
if ($appConfig->hasLanguage() && $this->questionHelper->ask($input, $output, new ConfirmationQuestion(
|
||||||
$keepConfig = $this->questionHelper->ask($input, $output, new ConfirmationQuestion(
|
'<question>Do you want to keep imported language? (Y/n):</question> '
|
||||||
'<question>Do you want to keep imported language? (Y/n):</question> '
|
))) {
|
||||||
));
|
return;
|
||||||
if ($keepConfig) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$appConfig->setLanguage([
|
$appConfig->setLanguage([
|
||||||
|
|
|
@ -24,13 +24,10 @@ class UrlShortenerConfigCustomizerPlugin extends AbstractConfigCustomizerPlugin
|
||||||
{
|
{
|
||||||
$this->printTitle($output, 'URL SHORTENER');
|
$this->printTitle($output, 'URL SHORTENER');
|
||||||
|
|
||||||
if ($appConfig->hasUrlShortener()) {
|
if ($appConfig->hasUrlShortener() && $this->questionHelper->ask($input, $output, new ConfirmationQuestion(
|
||||||
$keepConfig = $this->questionHelper->ask($input, $output, new ConfirmationQuestion(
|
'<question>Do you want to keep imported URL shortener config? (Y/n):</question> '
|
||||||
'<question>Do you want to keep imported URL shortener config? (Y/n):</question> '
|
))) {
|
||||||
));
|
return;
|
||||||
if ($keepConfig) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ask for URL shortener params
|
// Ask for URL shortener params
|
||||||
|
|
Loading…
Reference in a new issue