@@ -14,6 +14,9 @@ |
||
| 14 | 14 | $isRegex, |
| 15 | 15 | $filter; |
| 16 | 16 | |
| 17 | + /** |
|
| 18 | + * @param string $filter |
|
| 19 | + */ |
|
| 17 | 20 | public function __construct($filter, \Iterator $iterator) |
| 18 | 21 | { |
| 19 | 22 | parent::__construct($iterator); |
@@ -127,6 +127,9 @@ discard block |
||
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | + /** |
|
| 131 | + * @param string|boolean $fileContent |
|
| 132 | + */ |
|
| 130 | 133 | private function parseFileDirectives($file, & $fileContent, $environment) |
| 131 | 134 | { |
| 132 | 135 | $this->currentFormatterName = null; |
@@ -210,6 +213,9 @@ discard block |
||
| 210 | 213 | return preg_replace('~(<%\s*karma:[^%]*%>\s*)~i', '', $fileContent); |
| 211 | 214 | } |
| 212 | 215 | |
| 216 | + /** |
|
| 217 | + * @return string |
|
| 218 | + */ |
|
| 213 | 219 | private function injectValues($sourceFile, $content, $environment, $replacementCounter = 0) |
| 214 | 220 | { |
| 215 | 221 | $replacementCounter += $this->injectScalarValues($content, $environment); |
@@ -334,6 +340,9 @@ discard block |
||
| 334 | 340 | return "\n"; |
| 335 | 341 | } |
| 336 | 342 | |
| 343 | + /** |
|
| 344 | + * @param string $targetFile |
|
| 345 | + */ |
|
| 337 | 346 | private function backupFile($targetFile) |
| 338 | 347 | { |
| 339 | 348 | if($this->enableBackup === true) |
@@ -266,8 +266,7 @@ |
||
| 266 | 266 | { |
| 267 | 267 | $formatter = $this->getFormatterForCurrentTargetFile(); |
| 268 | 268 | |
| 269 | - $content = preg_replace_callback(self::VARIABLE_REGEX, function(array $matches) use($environment, $formatter) |
|
| 270 | - { |
|
| 269 | + $content = preg_replace_callback(self::VARIABLE_REGEX, function(array $matches) use($environment, $formatter) { |
|
| 271 | 270 | $value = $this->readValueToInject($matches['variableName'], $environment); |
| 272 | 271 | |
| 273 | 272 | if(is_array($value)) |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | $table->enableFormattingTags() |
| 46 | 46 | ->setHeaders(array($environment1, $environment2)) |
| 47 | 47 | ->displayKeys() |
| 48 | - ->setValueRenderingFunction(function($value){ |
|
| 48 | + ->setValueRenderingFunction(function($value) { |
|
| 49 | 49 | return $this->formatValue($value); |
| 50 | 50 | }); |
| 51 | 51 | |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | private function processInputs(InputInterface $input) |
| 47 | - { |
|
| 47 | + { |
|
| 48 | 48 | $sourcePath = $input->getArgument('sourcePath'); |
| 49 | 49 | if($sourcePath === null) |
| 50 | 50 | { |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | |
| 34 | 34 | public function getAllVariables() |
| 35 | 35 | { |
| 36 | - $variables = array_map(function($item){ |
|
| 36 | + $variables = array_map(function($item) { |
|
| 37 | 37 | return explode(':', $item)[0]; |
| 38 | 38 | }, array_keys($this->values)); |
| 39 | 39 | |
@@ -77,6 +77,9 @@ discard block |
||
| 77 | 77 | return $this; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | + /** |
|
| 81 | + * @param string $masterFilePath |
|
| 82 | + */ |
|
| 80 | 83 | public function parse($masterFilePath) |
| 81 | 84 | { |
| 82 | 85 | try |
@@ -199,6 +202,9 @@ discard block |
||
| 199 | 202 | return $sectionName; |
| 200 | 203 | } |
| 201 | 204 | |
| 205 | + /** |
|
| 206 | + * @param string $sectionName |
|
| 207 | + */ |
|
| 202 | 208 | private function switchSectionParser($sectionName) |
| 203 | 209 | { |
| 204 | 210 | if(! isset($this->parsers[$sectionName])) |