@@ -51,7 +51,7 @@ |
||
51 | 51 | */ |
52 | 52 | public function getArgumentValue($name) |
53 | 53 | { |
54 | - return array_reduce($this->arguments, function ($carry, $item) use ($name) { |
|
54 | + return array_reduce($this->arguments, function($carry, $item) use ($name) { |
|
55 | 55 | if (substr(strtolower($item), 0, strlen($name) + 2) == '--' . $name) { |
56 | 56 | $val = explode('=', $item); |
57 | 57 | return trim($val[1]); |
@@ -112,7 +112,7 @@ |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | if (!is_null($outFile)) { |
115 | - ksort($values[self::$PARAMETER_KEY]); |
|
115 | + ksort($values[self::$PARAMETER_KEY]); |
|
116 | 116 | $this->fs->dumpFile($outFile, Yaml::dump($values)); |
117 | 117 | } else { |
118 | 118 | return $values; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | |
86 | 86 | /** |
87 | 87 | * @param $inFile |
88 | - * @param null $outFile |
|
88 | + * @param string $outFile |
|
89 | 89 | * @param array $stack |
90 | 90 | * @return array|bool|mixed |
91 | 91 | */ |
@@ -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 |