@@ -19,25 +19,25 @@ |
||
19 | 19 | file_put_contents($fileName, $content, 99); |
20 | 20 | } |
21 | 21 | |
22 | - /** |
|
23 | - * @param $value |
|
24 | - * @return string |
|
25 | - */ |
|
22 | + /** |
|
23 | + * @param $value |
|
24 | + * @return string |
|
25 | + */ |
|
26 | 26 | protected function serialize($value) { |
27 | - switch (gettype($value)) { |
|
28 | - case 'boolean': |
|
29 | - return $value ? 'true' : 'false'; |
|
30 | - case 'array': |
|
31 | - case 'object': |
|
32 | - return "'" . serialize($value) . "'"; |
|
33 | - case 'NULL': |
|
34 | - return "null"; |
|
35 | - case 'integer': |
|
36 | - case 'double': |
|
37 | - return $value; |
|
38 | - default: |
|
39 | - return "'" . addslashes($value) . "'"; |
|
40 | - } |
|
41 | - } |
|
27 | + switch (gettype($value)) { |
|
28 | + case 'boolean': |
|
29 | + return $value ? 'true' : 'false'; |
|
30 | + case 'array': |
|
31 | + case 'object': |
|
32 | + return "'" . serialize($value) . "'"; |
|
33 | + case 'NULL': |
|
34 | + return "null"; |
|
35 | + case 'integer': |
|
36 | + case 'double': |
|
37 | + return $value; |
|
38 | + default: |
|
39 | + return "'" . addslashes($value) . "'"; |
|
40 | + } |
|
41 | + } |
|
42 | 42 | |
43 | 43 | } |
44 | 44 | \ No newline at end of file |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } |
118 | 118 | |
119 | 119 | if (!is_null($outFile)) { |
120 | - ksort($values[self::$PARAMETER_KEY]); |
|
120 | + ksort($values[self::$PARAMETER_KEY]); |
|
121 | 121 | $this->fs->dumpFile($outFile, Yaml::dump($values)); |
122 | 122 | } else { |
123 | 123 | return $values; |
@@ -155,14 +155,14 @@ discard block |
||
155 | 155 | |
156 | 156 | protected function processEnvironmentalVariables(array $parameters) |
157 | 157 | { |
158 | - $processed = array(); |
|
159 | - foreach ($parameters as $key => $parameter) { |
|
160 | - if (!is_string($parameter)) { |
|
161 | - $processed[$key] = $parameter; |
|
162 | - } else { |
|
163 | - $processed[$key] = $this->fileHandler->processEnvironmentalVariable($parameter); |
|
164 | - } |
|
165 | - } |
|
166 | - return $processed; |
|
158 | + $processed = array(); |
|
159 | + foreach ($parameters as $key => $parameter) { |
|
160 | + if (!is_string($parameter)) { |
|
161 | + $processed[$key] = $parameter; |
|
162 | + } else { |
|
163 | + $processed[$key] = $this->fileHandler->processEnvironmentalVariable($parameter); |
|
164 | + } |
|
165 | + } |
|
166 | + return $processed; |
|
167 | 167 | } |
168 | 168 | } |