@@ -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) |
@@ -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 | } |
@@ -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 | } |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | private function writeLevel($level) |
| 51 | 51 | { |
| 52 | 52 | $message = str_pad(sprintf( |
| 53 | - '[%s]', |
|
| 54 | - strtoupper($level) |
|
| 53 | + '[%s]', |
|
| 54 | + strtoupper($level) |
|
| 55 | 55 | ), 10); |
| 56 | 56 | |
| 57 | 57 | $this->output->write($this->colorizeMessage($level, $message)); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | if(isset($colors[$level])) |
| 68 | 68 | { |
| 69 | 69 | $message = sprintf( |
| 70 | - '<%1$s>%2$s</%1$s>', |
|
| 70 | + '<%1$s>%2$s</%1$s>', |
|
| 71 | 71 | 'fg=' . $colors[$level], |
| 72 | 72 | $message |
| 73 | 73 | ); |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | catch(ParseException $e) |
| 57 | 57 | { |
| 58 | 58 | throw new \RuntimeException(sprintf( |
| 59 | - 'Error while parsing profile : %s', |
|
| 59 | + 'Error while parsing profile : %s', |
|
| 60 | 60 | $e->getMessage() |
| 61 | 61 | )); |
| 62 | 62 | } |
@@ -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])) |
@@ -239,9 +239,9 @@ discard block |
||
| 239 | 239 | foreach($files as $file => $status) |
| 240 | 240 | { |
| 241 | 241 | $message = sprintf( |
| 242 | - 'External file %s was %s', |
|
| 243 | - $file, |
|
| 244 | - $status['found'] ? 'found' : 'not found' |
|
| 242 | + 'External file %s was %s', |
|
| 243 | + $file, |
|
| 244 | + $status['found'] ? 'found' : 'not found' |
|
| 245 | 245 | ); |
| 246 | 246 | |
| 247 | 247 | $this->warning($message); |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | |
| 296 | 296 | public function getDefaultEnvironmentsForGroups() |
| 297 | 297 | { |
| 298 | - $defaultEnvironments = array(); |
|
| 298 | + $defaultEnvironments = array(); |
|
| 299 | 299 | |
| 300 | 300 | if(isset($this->parsers[self::GROUPS])) |
| 301 | 301 | { |