@@ -30,6 +30,11 @@ discard block |
||
| 30 | 30 | protected |
| 31 | 31 | $environment; |
| 32 | 32 | |
| 33 | + /** |
|
| 34 | + * @param string $name |
|
| 35 | + * @param string $description |
|
| 36 | + * @param string $outputTitle |
|
| 37 | + */ |
|
| 33 | 38 | public function __construct(Application $app, $name, $description, $outputTitle) |
| 34 | 39 | { |
| 35 | 40 | $this->name = $name; |
@@ -128,6 +133,10 @@ discard block |
||
| 128 | 133 | } |
| 129 | 134 | |
| 130 | 135 | abstract protected function launchConfigurationAction(ConfigurableProcessor $processor); |
| 136 | + |
|
| 137 | + /** |
|
| 138 | + * @return ConfigurableProcessor |
|
| 139 | + */ |
|
| 131 | 140 | abstract protected function getProcessor(); |
| 132 | 141 | |
| 133 | 142 | private function configureProcessor(ConfigurableProcessor $processor) |
@@ -153,6 +162,9 @@ discard block |
||
| 153 | 162 | } |
| 154 | 163 | } |
| 155 | 164 | |
| 165 | + /** |
|
| 166 | + * @param string $optionName |
|
| 167 | + */ |
|
| 156 | 168 | private function parseOptionWithAssignments(InputInterface $input, $optionName) |
| 157 | 169 | { |
| 158 | 170 | $strings = $input->getOption($optionName); |
@@ -199,6 +199,9 @@ |
||
| 199 | 199 | return $sectionName; |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | + /** |
|
| 203 | + * @param string $sectionName |
|
| 204 | + */ |
|
| 202 | 205 | private function switchSectionParser($sectionName) |
| 203 | 206 | { |
| 204 | 207 | if(! isset($this->parsers[$sectionName])) |
@@ -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); |
@@ -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 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | |
| 43 | 43 | public function getAllVariables() |
| 44 | 44 | { |
| 45 | - $variables = array_map(function($key){ |
|
| 45 | + $variables = array_map(function($key) { |
|
| 46 | 46 | return $this->extractVariableName($key); |
| 47 | 47 | }, array_keys($this->values)); |
| 48 | 48 | |
@@ -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)) |
@@ -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; |
@@ -201,6 +204,9 @@ discard block |
||
| 201 | 204 | } |
| 202 | 205 | } |
| 203 | 206 | |
| 207 | + /** |
|
| 208 | + * @param string $delimiter |
|
| 209 | + */ |
|
| 204 | 210 | private function generateContentForListDirective($variable, $environment, $delimiter, array $wrapper) |
| 205 | 211 | { |
| 206 | 212 | $values = $this->readValueToInject($variable, $environment); |
@@ -229,6 +235,9 @@ discard block |
||
| 229 | 235 | return preg_replace('~(<%\s*karma:[^%]*%>\s*)~i', '', $fileContent); |
| 230 | 236 | } |
| 231 | 237 | |
| 238 | + /** |
|
| 239 | + * @return string |
|
| 240 | + */ |
|
| 232 | 241 | private function injectValues($sourceFile, $content, $environment, $replacementCounter = 0) |
| 233 | 242 | { |
| 234 | 243 | $replacementCounter += $this->injectScalarValues($content, $environment); |
@@ -353,6 +362,9 @@ discard block |
||
| 353 | 362 | return "\n"; |
| 354 | 363 | } |
| 355 | 364 | |
| 365 | + /** |
|
| 366 | + * @param string $targetFile |
|
| 367 | + */ |
|
| 356 | 368 | private function backupFile($targetFile) |
| 357 | 369 | { |
| 358 | 370 | if($this->enableBackup === true) |