Skip to content

Commit cecccdf

Browse files
committed
[TASK] Clean up code
1 parent b9220de commit cecccdf

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Install/Action/SetupConfigurationAction.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ private function populateCustomSettings(array $actionDefinition, array $options)
8989
foreach ($arguments as $argumentName => $argumentValue) {
9090
$customConfig = Config::setValue($customConfig, $argumentDefinitions[$argumentName]['configPath'], $argumentValue);
9191
}
92+
if ($customConfig === []) {
93+
return;
94+
}
9295
$this->addValuesToOverrides($customConfig);
9396
}
9497

@@ -127,13 +130,10 @@ private function addValuesToOverrides(array $values): void
127130
$configFile = SettingsFiles::getOverrideSettingsFile();
128131
$reader = (new ConfigurationReaderFactory(dirname($configFile)))->createReader($configFile);
129132
$currentConfig = $reader->hasConfig() ? $reader->readConfig() : [];
130-
$config = array_replace_recursive($currentConfig, $values);
131-
132-
if(empty($config)) {
133-
return;
134-
}
135-
136-
$this->configDumper->dumpToFile($config, $configFile);
133+
$this->configDumper->dumpToFile(
134+
array_replace_recursive($currentConfig, $values),
135+
$configFile
136+
);
137137
}
138138

139139
private function copyEnvDistFile(): void

0 commit comments

Comments
 (0)