@@ -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\Formatters; |
| 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\Formatters; |
| 6 | 6 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | { |
| 52 | 52 | if($value === '<string>') |
| 53 | 53 | { |
| 54 | - $result = function ($value) use ($result) { |
|
| 54 | + $result = function($value) use ($result) { |
|
| 55 | 55 | return str_replace('<string>', $value, $result); |
| 56 | 56 | }; |
| 57 | 57 | } |
@@ -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 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | { |
| 84 | 84 | $files = [$masterFilePath]; |
| 85 | 85 | |
| 86 | - while(! empty($files)) |
|
| 86 | + while( ! empty($files)) |
|
| 87 | 87 | { |
| 88 | 88 | foreach($files as $file) |
| 89 | 89 | { |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | private function extractLines(string $filePath): array |
| 137 | 137 | { |
| 138 | - if(! $this->fs->has($filePath)) |
|
| 138 | + if( ! $this->fs->has($filePath)) |
|
| 139 | 139 | { |
| 140 | 140 | throw new \RuntimeException("$filePath does not exist"); |
| 141 | 141 | } |
@@ -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 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | $this->variables = $variables; |
| 28 | 28 | |
| 29 | 29 | $this->externalReader = null; |
| 30 | - if(! empty($externalVariables)) |
|
| 30 | + if( ! empty($externalVariables)) |
|
| 31 | 31 | { |
| 32 | 32 | $this->externalReader = new Reader($externalVariables, [], $groups); |
| 33 | 33 | } |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | if(in_array($environment, $this->groupNames)) |
| 62 | 62 | { |
| 63 | - if(! isset($this->defaultEnvironmentsForGroups[$environment])) |
|
| 63 | + if( ! isset($this->defaultEnvironmentsForGroups[$environment])) |
|
| 64 | 64 | { |
| 65 | 65 | throw new \RuntimeException(sprintf( |
| 66 | 66 | 'Group can not be used as environment (try with group %s detected)', |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | private function accessVariable(string $variableName) |
| 105 | 105 | { |
| 106 | - if(! array_key_exists($variableName, $this->variables)) |
|
| 106 | + if( ! array_key_exists($variableName, $this->variables)) |
|
| 107 | 107 | { |
| 108 | 108 | throw new \RuntimeException(sprintf( |
| 109 | 109 | 'Unknown variable %s', |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | |
| 131 | 131 | private function processExternal(string $variable, string $environment) |
| 132 | 132 | { |
| 133 | - if(! $this->externalReader instanceof self) |
|
| 133 | + if( ! $this->externalReader instanceof self) |
|
| 134 | 134 | { |
| 135 | 135 | throw new \RuntimeException(sprintf( |
| 136 | 136 | 'There is no external variables. %s can not be resolve for environment %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 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | public function setDefaultEnvironment(string $environment): void |
| 44 | 44 | { |
| 45 | - if(! empty($environment) && is_string($environment)) |
|
| 45 | + if( ! empty($environment) && is_string($environment)) |
|
| 46 | 46 | { |
| 47 | 47 | $this->defaultEnvironment = $environment; |
| 48 | 48 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | }, $value); |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - if(! is_string($value)) |
|
| 94 | + if( ! is_string($value)) |
|
| 95 | 95 | { |
| 96 | 96 | return $value; |
| 97 | 97 | } |
@@ -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\Parser; |
| 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\Parser; |
| 6 | 6 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | private function hasDuplicatedValues(array $values): bool |
| 112 | 112 | { |
| 113 | - $duplicatedValues = array_filter(array_count_values($values), function ($counter) { |
|
| 113 | + $duplicatedValues = array_filter(array_count_values($values), function($counter) { |
|
| 114 | 114 | return $counter !== 1; |
| 115 | 115 | }); |
| 116 | 116 | |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | |
| 157 | 157 | $errors = array_intersect($allEnvironments, array_keys($this->groups)); |
| 158 | 158 | |
| 159 | - if(! empty($errors)) |
|
| 159 | + if( ! empty($errors)) |
|
| 160 | 160 | { |
| 161 | 161 | throw new \RuntimeException(sprintf( |
| 162 | 162 | 'Error : a group can not be part of another group (%s)', |
@@ -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\Parser; |
| 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\Parser; |
| 6 | 6 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | private function checkFilenameIsValid(string $filename): void |
| 32 | 32 | { |
| 33 | - if(! preg_match('~.*\.conf$~', $filename)) |
|
| 33 | + if( ! preg_match('~.*\.conf$~', $filename)) |
|
| 34 | 34 | { |
| 35 | 35 | $this->triggerError("$filename is not a valid file name", 'Invalid dependency'); |
| 36 | 36 | } |