@@ -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\Configuration; |
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\Configuration; |
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\Configuration; |
6 | 6 | |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | { |
11 | 11 | if(is_array($value)) |
12 | 12 | { |
13 | - return array_map(function ($item) { |
|
13 | + return array_map(function($item) { |
|
14 | 14 | return $this->filterOneValue($item); |
15 | 15 | }, $value); |
16 | 16 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | private function filterOneValue($value) |
22 | 22 | { |
23 | - if(! is_string($value)) |
|
23 | + if( ! is_string($value)) |
|
24 | 24 | { |
25 | 25 | return $value; |
26 | 26 | } |
@@ -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\Console; |
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\Console; |
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; |
6 | 6 | |
@@ -265,12 +265,12 @@ discard block |
||
265 | 265 | $values = $this->readValueToInject($variable, $environment); |
266 | 266 | $formatter = $this->getFormatterForCurrentTargetFile(); |
267 | 267 | |
268 | - if(! is_array($values)) |
|
268 | + if( ! is_array($values)) |
|
269 | 269 | { |
270 | 270 | $values = [$values]; |
271 | 271 | } |
272 | 272 | |
273 | - array_walk($values, static function (& $value) use ($formatter) { |
|
273 | + array_walk($values, static function(& $value) use ($formatter) { |
|
274 | 274 | $value = $formatter->format($value); |
275 | 275 | }); |
276 | 276 | |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | { |
381 | 381 | $values = $this->readValueToInject($matches['variableName'], $environment); |
382 | 382 | |
383 | - if(!is_array($values)) |
|
383 | + if( ! is_array($values)) |
|
384 | 384 | { |
385 | 385 | throw new \RuntimeException(sprintf( |
386 | 386 | "Nested variable detected [%s] while writing %s at line %d", |
@@ -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 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Karma\Configuration\Parser; |
6 | 6 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | private function hasDuplicatedValues(array $values): bool |
107 | 107 | { |
108 | - $duplicatedValues = array_filter(array_count_values($values), static function ($counter) { |
|
108 | + $duplicatedValues = array_filter(array_count_values($values), static function($counter) { |
|
109 | 109 | return $counter !== 1; |
110 | 110 | }); |
111 | 111 | |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | |
152 | 152 | $errors = array_intersect($allEnvironments, array_keys($this->groups)); |
153 | 153 | |
154 | - if(! empty($errors)) |
|
154 | + if( ! empty($errors)) |
|
155 | 155 | { |
156 | 156 | throw new \RuntimeException(sprintf( |
157 | 157 | 'Error : a group can not be part of another group (%s)', |
@@ -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\Configuration; |
6 | 6 | |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $this->variables = $variables; |
29 | 29 | |
30 | 30 | $this->externalReader = null; |
31 | - if(! empty($externalVariables)) |
|
31 | + if( ! empty($externalVariables)) |
|
32 | 32 | { |
33 | 33 | $this->externalReader = new Reader($externalVariables, [], $groups); |
34 | 34 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | if(in_array($environment, $this->groupNames, false)) |
63 | 63 | { |
64 | - if(! isset($this->defaultEnvironmentsForGroups[$environment])) |
|
64 | + if( ! isset($this->defaultEnvironmentsForGroups[$environment])) |
|
65 | 65 | { |
66 | 66 | throw new \RuntimeException(sprintf( |
67 | 67 | 'Group can not be used as environment (try with group %s detected)', |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | |
105 | 105 | private function accessVariable(string $variableName) |
106 | 106 | { |
107 | - if(! array_key_exists($variableName, $this->variables)) |
|
107 | + if( ! array_key_exists($variableName, $this->variables)) |
|
108 | 108 | { |
109 | 109 | throw new \RuntimeException(sprintf( |
110 | 110 | 'Unknown variable %s', |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | |
132 | 132 | private function processExternal(string $variable, string $environment) |
133 | 133 | { |
134 | - if(! $this->externalReader instanceof self) |
|
134 | + if( ! $this->externalReader instanceof self) |
|
135 | 135 | { |
136 | 136 | throw new \RuntimeException(sprintf( |
137 | 137 | 'There is no external variables. %s can not be resolve for environment %s', |