diff --git a/src/Manager.php b/src/Manager.php index 24fe5cf..4f202f2 100644 --- a/src/Manager.php +++ b/src/Manager.php @@ -149,10 +149,6 @@ public function fillKeys($fileName, array $keys) $newContent = array_replace_recursive($fileContent, $values); - array_walk_recursive($newContent, function ($value) { - return addslashes($value); - }); - $this->writeFile($filePath, $newContent); } } @@ -208,8 +204,11 @@ private function stringLineMaker($array, $prepend = '') foreach ($array as $key => $value) { if (is_array($value)) { $value = $this->stringLineMaker($value, $prepend.' '); + $output .= "\n{$prepend} '{$key}' => [{$value}\n{$prepend} ],"; } else { + $value = addslashes($value); + $output .= "\n{$prepend} '{$key}' => '{$value}',"; } }