$value) { $config->setDataByPath($key, $value); $config->save(); } }; $deleteConfigData = function (WriterInterface $writer, array $configData, string $scope, int $scopeId) { foreach ($configData as $path) { $writer->delete($path, $scope, $scopeId); } };