@@ -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 | |
@@ -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\Command; |
| 6 | 6 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | $table->enableFormattingTags() |
| 48 | 48 | ->setHeaders(array($environment1, $environment2)) |
| 49 | 49 | ->displayKeys() |
| 50 | - ->setValueRenderingFunction(function($value){ |
|
| 50 | + ->setValueRenderingFunction(function($value) { |
|
| 51 | 51 | return $this->formatValue($value); |
| 52 | 52 | }); |
| 53 | 53 | |
@@ -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)) |
@@ -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 | |
@@ -258,12 +258,12 @@ discard block |
||
| 258 | 258 | $values = $this->readValueToInject($variable, $environment); |
| 259 | 259 | $formatter = $this->getFormatterForCurrentTargetFile(); |
| 260 | 260 | |
| 261 | - if(! is_array($values)) |
|
| 261 | + if( ! is_array($values)) |
|
| 262 | 262 | { |
| 263 | 263 | $values = array($values); |
| 264 | 264 | } |
| 265 | 265 | |
| 266 | - array_walk($values, function (& $value) use ($formatter) { |
|
| 266 | + array_walk($values, function(& $value) use ($formatter) { |
|
| 267 | 267 | $value = $formatter->format($value); |
| 268 | 268 | }); |
| 269 | 269 | |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | { |
| 373 | 373 | $values = $this->readValueToInject($matches['variableName'], $environment); |
| 374 | 374 | |
| 375 | - if(!is_array($values)) |
|
| 375 | + if( ! is_array($values)) |
|
| 376 | 376 | { |
| 377 | 377 | throw new \RuntimeException(sprintf( |
| 378 | 378 | "Nested variable detected [%s] while writing %s at line %d", |
@@ -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 | |
@@ -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 true; |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | - if(! $parameterValidators[$parameter]($value)) |
|
| 201 | + if( ! $parameterValidators[$parameter]($value)) |
|
| 202 | 202 | { |
| 203 | 203 | throw new \RuntimeException('Paramater %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\FormatterProviders; |
| 6 | 6 | |
@@ -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\FormatterProviders; |
| 6 | 6 | |
@@ -32,14 +32,14 @@ discard block |
||
| 32 | 32 | |
| 33 | 33 | private function parseFormatters($content): void |
| 34 | 34 | { |
| 35 | - if(! is_array($content)) |
|
| 35 | + if( ! is_array($content)) |
|
| 36 | 36 | { |
| 37 | 37 | throw new \InvalidArgumentException('Syntax error in profile [formatters]'); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | foreach($content as $name => $rules) |
| 41 | 41 | { |
| 42 | - if(! is_array($rules)) |
|
| 42 | + if( ! is_array($rules)) |
|
| 43 | 43 | { |
| 44 | 44 | throw new \InvalidArgumentException('Syntax error in profile [formatters]'); |
| 45 | 45 | } |
@@ -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\Command; |
| 6 | 6 | |
@@ -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\Filesystem\Adapters; |
| 6 | 6 | |