Refactored Databa config customizer so that it uses new structure

This commit is contained in:
Alejandro Celaya
2018-10-05 18:43:39 +02:00
parent 1b5081ae21
commit ebf2e459e8
5 changed files with 90 additions and 31 deletions

View File

@@ -31,8 +31,8 @@ class UrlShortenerConfigCustomizer implements ConfigCustomizerInterface
$io->title('URL SHORTENER');
$urlShortener = $appConfig->getUrlShortener();
$diffKeys = $appConfig->hasUrlShortener() && $io->confirm('Do you want to keep imported URL shortener config?');
$keysToAskFor = $diffKeys ? array_diff(self::EXPECTED_KEYS, array_keys($urlShortener)) : self::EXPECTED_KEYS;
$doImport = $appConfig->hasUrlShortener() && $io->confirm('Do you want to keep imported URL shortener config?');
$keysToAskFor = $doImport ? array_diff(self::EXPECTED_KEYS, array_keys($urlShortener)) : self::EXPECTED_KEYS;
if (empty($keysToAskFor)) {
return;