@@ -110,7 +110,7 @@ |
||
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | $this->info(sprintf( |
| 113 | - '%d files generated', |
|
| 113 | + '%d files generated', |
|
| 114 | 114 | count($files) |
| 115 | 115 | )); |
| 116 | 116 | } |
@@ -118,7 +118,7 @@ |
||
| 118 | 118 | |
| 119 | 119 | $targetContent = $this->injectValues($file, $content, $environment, $replacementCounter); |
| 120 | 120 | |
| 121 | - $this->debug("Write $this->currentTargetFile"); |
|
| 121 | + $this->debug("write $this->currentTargetFile"); |
|
| 122 | 122 | |
| 123 | 123 | if($this->dryRun === false) |
| 124 | 124 | { |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma; |
| 6 | 6 | |
@@ -267,12 +267,12 @@ discard block |
||
| 267 | 267 | $values = $this->readValueToInject($variable, $environment); |
| 268 | 268 | $formatter = $this->formatterForCurrentTargetFile(); |
| 269 | 269 | |
| 270 | - if(! is_array($values)) |
|
| 270 | + if( ! is_array($values)) |
|
| 271 | 271 | { |
| 272 | 272 | $values = [$values]; |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | - array_walk($values, static function (& $value) use ($formatter) { |
|
| 275 | + array_walk($values, static function(& $value) use ($formatter) { |
|
| 276 | 276 | $value = $formatter->format($value); |
| 277 | 277 | }); |
| 278 | 278 | |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | { |
| 383 | 383 | $values = $this->readValueToInject($matches['variableName'], $environment); |
| 384 | 384 | |
| 385 | - if(!is_array($values)) |
|
| 385 | + if( ! is_array($values)) |
|
| 386 | 386 | { |
| 387 | 387 | throw new \RuntimeException(sprintf( |
| 388 | 388 | "Nested variable detected [%s] while writing %s at line %d", |
@@ -347,8 +347,7 @@ |
||
| 347 | 347 | { |
| 348 | 348 | $formatter = $this->formatterForCurrentTargetFile(); |
| 349 | 349 | |
| 350 | - $content = preg_replace_callback(self::VARIABLE_REGEX, function(array $matches) use($environment, $formatter) |
|
| 351 | - { |
|
| 350 | + $content = preg_replace_callback(self::VARIABLE_REGEX, function(array $matches) use($environment, $formatter) { |
|
| 352 | 351 | $value = $this->readValueToInject($matches['variableName'], $environment); |
| 353 | 352 | |
| 354 | 353 | if(is_array($value)) |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma; |
| 6 | 6 | |
@@ -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 | } |
@@ -193,8 +193,7 @@ |
||
| 193 | 193 | if( |
| 194 | 194 | ! array_key_exists($parameter, $parameterValidators) |
| 195 | 195 | || ! $parameterValidators[$parameter] instanceof \Closure |
| 196 | - ) |
|
| 197 | - { |
|
| 196 | + ) { |
|
| 198 | 197 | return; |
| 199 | 198 | } |
| 200 | 199 | |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma; |
| 6 | 6 | |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | |
| 68 | 68 | foreach(array_keys($this->attributes) as $name) |
| 69 | 69 | { |
| 70 | - if(! isset($values[$name])) |
|
| 70 | + if( ! isset($values[$name])) |
|
| 71 | 71 | { |
| 72 | 72 | continue; |
| 73 | 73 | } |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | return; |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | - if(! $parameterValidators[$parameter]($value)) |
|
| 201 | + if( ! $parameterValidators[$parameter]($value)) |
|
| 202 | 202 | { |
| 203 | 203 | throw new \RuntimeException('Parameter %s format is invalid'); |
| 204 | 204 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma\Filesystem\Adapters; |
| 6 | 6 | |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - throw new \RuntimeException("Key $key not found"); |
|
| 39 | + throw new \RuntimeException("key $key not found"); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | public function read($key) |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma\Filesystem\Adapters; |
| 6 | 6 | |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | public function read($key) |
| 22 | 22 | { |
| 23 | - if(! $this->exists($key)) |
|
| 23 | + if( ! $this->exists($key)) |
|
| 24 | 24 | { |
| 25 | 25 | return false; |
| 26 | 26 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | public function mtime($key) |
| 47 | 47 | { |
| 48 | - if(! $this->exists($key)) |
|
| 48 | + if( ! $this->exists($key)) |
|
| 49 | 49 | { |
| 50 | 50 | return false; |
| 51 | 51 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma\FormatterProviders; |
| 6 | 6 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types = 1); |
|
| 3 | +declare(strict_types=1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Karma\FormatterProviders; |
| 6 | 6 | |