@@ -150,6 +150,9 @@ discard block |
||
| 150 | 150 | } |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | + /** |
|
| 154 | + * @param string|boolean $fileContent |
|
| 155 | + */ |
|
| 153 | 156 | private function parseFileDirectives($file, & $fileContent, $environment) |
| 154 | 157 | { |
| 155 | 158 | $this->currentFormatterName = null; |
@@ -224,6 +227,9 @@ discard block |
||
| 224 | 227 | } |
| 225 | 228 | } |
| 226 | 229 | |
| 230 | + /** |
|
| 231 | + * @param string $delimiter |
|
| 232 | + */ |
|
| 227 | 233 | private function generateContentForListDirective($variable, $environment, $delimiter, array $wrapper) |
| 228 | 234 | { |
| 229 | 235 | $values = $this->readValueToInject($variable, $environment); |
@@ -252,6 +258,9 @@ discard block |
||
| 252 | 258 | return preg_replace('~(<%\s*karma:[^%]*%>\s*)~i', '', $fileContent); |
| 253 | 259 | } |
| 254 | 260 | |
| 261 | + /** |
|
| 262 | + * @return string |
|
| 263 | + */ |
|
| 255 | 264 | private function injectValues($sourceFile, $content, $environment, $replacementCounter = 0) |
| 256 | 265 | { |
| 257 | 266 | $replacementCounter += $this->injectScalarValues($content, $environment); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | $paths = $c['sources.path']; |
| 112 | 112 | |
| 113 | - if(! is_array($paths)) |
|
| 113 | + if( ! is_array($paths)) |
|
| 114 | 114 | { |
| 115 | 115 | $paths = array($paths); |
| 116 | 116 | } |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | |
| 128 | 128 | $this['target.fileSystem.adapter'] = function($c) { |
| 129 | 129 | |
| 130 | - if(! empty($c['target.path'])) |
|
| 130 | + if( ! empty($c['target.path'])) |
|
| 131 | 131 | { |
| 132 | 132 | $c['hydrator.allowNonDistFilesOverwrite'] = true; |
| 133 | 133 | |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | $this['git'] = $git; |
| 200 | 200 | $this['vcs'] = $git; |
| 201 | 201 | |
| 202 | - $this['vcsHandler'] = $this->protect(function (Vcs $vcs) { |
|
| 202 | + $this['vcsHandler'] = $this->protect(function(Vcs $vcs) { |
|
| 203 | 203 | $handler = new VcsHandler($vcs, $this['finder']); |
| 204 | 204 | |
| 205 | 205 | $handler->setLogger($this['logger']) |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | return new \Psr\Log\NullLogger(); |
| 216 | 216 | }); |
| 217 | 217 | |
| 218 | - $this['formatter.provider'] = $this->share(function ($c) { |
|
| 218 | + $this['formatter.provider'] = $this->share(function($c) { |
|
| 219 | 219 | return new ProfileProvider($c['profile']); |
| 220 | 220 | }); |
| 221 | 221 | |
@@ -229,19 +229,19 @@ discard block |
||
| 229 | 229 | return $hydrator; |
| 230 | 230 | }; |
| 231 | 231 | |
| 232 | - $this['generator.nameTranslator'] = $this->share(function ($c) { |
|
| 232 | + $this['generator.nameTranslator'] = $this->share(function($c) { |
|
| 233 | 233 | $translator = new FilePrefixTranslator(); |
| 234 | 234 | $translator->changeMasterFile($c['configuration.masterFile']); |
| 235 | 235 | |
| 236 | 236 | return $translator; |
| 237 | 237 | }); |
| 238 | 238 | |
| 239 | - $this['generator.variableProvider'] = function ($c) { |
|
| 239 | + $this['generator.variableProvider'] = function($c) { |
|
| 240 | 240 | $provider = new VariableProvider($c['parser'], $c['configuration.masterFile']); |
| 241 | 241 | |
| 242 | 242 | $profile = $c['profile']; |
| 243 | 243 | $options = $profile->getGeneratorOptions(); |
| 244 | - if(! isset($options['translator']) || $options['translator'] === 'prefix') |
|
| 244 | + if( ! isset($options['translator']) || $options['translator'] === 'prefix') |
|
| 245 | 245 | { |
| 246 | 246 | $provider->setNameTranslator($c['generator.nameTranslator']); |
| 247 | 247 | } |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | return $provider; |
| 250 | 250 | }; |
| 251 | 251 | |
| 252 | - $this['configurationFilesGenerator'] = $this->share(function ($c) { |
|
| 252 | + $this['configurationFilesGenerator'] = $this->share(function($c) { |
|
| 253 | 253 | return new YamlGenerator($c['sources.fileSystem'], $c['configuration'], $c['generator.variableProvider']); |
| 254 | 254 | }); |
| 255 | 255 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | foreach(array_keys($this->attributes) as $name) |
| 67 | 67 | { |
| 68 | - if(! isset($values[$name])) |
|
| 68 | + if( ! isset($values[$name])) |
|
| 69 | 69 | { |
| 70 | 70 | continue; |
| 71 | 71 | } |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | return true; |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | - if(! $parameterValidators[$parameter]($value)) |
|
| 199 | + if( ! $parameterValidators[$parameter]($value)) |
|
| 200 | 200 | { |
| 201 | 201 | throw new \RuntimeException('Paramater %s format is invalid'); |
| 202 | 202 | } |
@@ -191,8 +191,7 @@ |
||
| 191 | 191 | if( |
| 192 | 192 | ! array_key_exists($parameter, $parameterValidators) |
| 193 | 193 | || ! $parameterValidators[$parameter] instanceof \Closure |
| 194 | - ) |
|
| 195 | - { |
|
| 194 | + ) { |
|
| 196 | 195 | return true; |
| 197 | 196 | } |
| 198 | 197 | |