@@ -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); |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | { |
| 147 | 147 | $processor->setSystemEnvironment($this->systemEnvironment); |
| 148 | 148 | |
| 149 | - $this->app['logger']->info(sprintf( |
|
| 149 | + $this->app['logger']->info(sprintf( |
|
| 150 | 150 | 'Hydrate <important>system</important> variables with <important>%s</important> values', |
| 151 | 151 | $this->systemEnvironment |
| 152 | 152 | )); |
@@ -197,9 +197,9 @@ discard block |
||
| 197 | 197 | foreach($overrides as $variable => $value) |
| 198 | 198 | { |
| 199 | 199 | $logger->info(sprintf( |
| 200 | - 'Override <important>%s</important> with value <important>%s</important>', |
|
| 201 | - $variable, |
|
| 202 | - $value |
|
| 200 | + 'Override <important>%s</important> with value <important>%s</important>', |
|
| 201 | + $variable, |
|
| 202 | + $value |
|
| 203 | 203 | )); |
| 204 | 204 | |
| 205 | 205 | $value = $this->parseList($value); |
@@ -216,9 +216,9 @@ discard block |
||
| 216 | 216 | foreach($data as $variable => $value) |
| 217 | 217 | { |
| 218 | 218 | $logger->info(sprintf( |
| 219 | - 'Set custom data <important>%s</important> with value <important>%s</important>', |
|
| 220 | - $variable, |
|
| 221 | - $value |
|
| 219 | + 'Set custom data <important>%s</important> with value <important>%s</important>', |
|
| 220 | + $variable, |
|
| 221 | + $value |
|
| 222 | 222 | )); |
| 223 | 223 | |
| 224 | 224 | $reader->setCustomData($variable, $this->filterValue($value)); |
@@ -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])) |
@@ -240,8 +240,8 @@ discard block |
||
| 240 | 240 | if($status['found'] === false) |
| 241 | 241 | { |
| 242 | 242 | $this->warning(sprintf( |
| 243 | - 'External file %s was not found', |
|
| 244 | - $file |
|
| 243 | + 'External file %s was not found', |
|
| 244 | + $file |
|
| 245 | 245 | )); |
| 246 | 246 | } |
| 247 | 247 | } |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | |
| 295 | 295 | public function getDefaultEnvironmentsForGroups() |
| 296 | 296 | { |
| 297 | - $defaultEnvironments = array(); |
|
| 297 | + $defaultEnvironments = array(); |
|
| 298 | 298 | |
| 299 | 299 | if(isset($this->parsers[self::GROUPS])) |
| 300 | 300 | { |
@@ -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); |
@@ -116,7 +116,7 @@ |
||
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | $this->output->writeln( |
| 119 | - $this->getLogo($this->output->isDecorated()) |
|
| 119 | + $this->getLogo($this->output->isDecorated()) |
|
| 120 | 120 | ); |
| 121 | 121 | } |
| 122 | 122 | |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | foreach($values as $variable => $value) |
| 62 | 62 | { |
| 63 | 63 | $this->output->writeln(sprintf( |
| 64 | - '<fg=cyan>%s</fg=cyan> = %s', |
|
| 64 | + '<fg=cyan>%s</fg=cyan> = %s', |
|
| 65 | 65 | $variable, |
| 66 | 66 | $this->formatValue($value) |
| 67 | 67 | )); |
@@ -153,7 +153,7 @@ |
||
| 153 | 153 | if(! empty($errors)) |
| 154 | 154 | { |
| 155 | 155 | throw new \RuntimeException(sprintf( |
| 156 | - 'Error : a group can not be part of another group (%s)', |
|
| 156 | + 'Error : a group can not be part of another group (%s)', |
|
| 157 | 157 | implode(', ', $errors) |
| 158 | 158 | )); |
| 159 | 159 | } |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | if(! isset($this->defaultEnvironmentsForGroups[$environment])) |
| 62 | 62 | { |
| 63 | 63 | throw new \RuntimeException(sprintf( |
| 64 | - 'Group can not be used as environment (try with group %s detected)', |
|
| 64 | + 'Group can not be used as environment (try with group %s detected)', |
|
| 65 | 65 | $environment |
| 66 | 66 | )); |
| 67 | 67 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | if(stripos($variableName, self::DELIMITER) === false) |
| 28 | 28 | { |
| 29 | 29 | throw new \RuntimeException(sprintf( |
| 30 | - 'Variable %s does not contain delimiter (%s)', |
|
| 30 | + 'Variable %s does not contain delimiter (%s)', |
|
| 31 | 31 | $variableName, |
| 32 | 32 | self::DELIMITER |
| 33 | 33 | )); |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | $this->info(sprintf( |
| 102 | - '%d files generated', |
|
| 102 | + '%d files generated', |
|
| 103 | 103 | count($distFiles) |
| 104 | 104 | )); |
| 105 | 105 | } |
@@ -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) |