Passed
Push — nln-php7 ( 12eaac )
by Nicolas
05:28
created
src/Karma/Configuration/Parser/ExternalParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Karma/Configuration/InMemoryReader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Karma\Configuration;
6 6
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
     public function getAllVariables()
46 46
     {
47
-        $variables = array_map(function($key){
47
+        $variables = array_map(function($key) {
48 48
             return $this->extractVariableName($key);
49 49
         }, array_keys($this->values));
50 50
 
Please login to merge, or discard this patch.
src/Karma/Configuration/AbstractReader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
42 42
 
43 43
     public function setDefaultEnvironment($environment)
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
         }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             }, $value);
98 98
         }
99 99
 
100
-        if(! is_string($value))
100
+        if( ! is_string($value))
101 101
         {
102 102
             return $value;
103 103
         }
Please login to merge, or discard this patch.
src/Karma/Configuration/ValueFilterIterator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Karma\Configuration;
6 6
 
Please login to merge, or discard this patch.
src/Karma/Configuration/Reader.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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, array(), $groups);
33 33
         }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
103 103
 
104 104
     private function accessVariable($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
 block discarded – undo
130 130
 
131 131
     private function processExternal($variable, $environment)
132 132
     {
133
-        if(! $this->externalReader instanceof Reader)
133
+        if( ! $this->externalReader instanceof Reader)
134 134
         {
135 135
             throw new \RuntimeException(sprintf(
136 136
                 'There is no external variables. %s can not be resolve for environment %s',
Please login to merge, or discard this patch.
src/Karma/Configuration/FilterInputVariable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Karma/Configuration/Parser.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -244,8 +244,8 @@  discard block
 block discarded – undo
244 244
             if($status['found'] === false)
245 245
             {
246 246
                 $this->warning(sprintf(
247
-                   'External file %s was not found',
248
-                   $file
247
+                    'External file %s was not found',
248
+                    $file
249 249
                 ));
250 250
             }
251 251
         }
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 
299 299
     public function getDefaultEnvironmentsForGroups(): array
300 300
     {
301
-         $defaultEnvironments = [];
301
+            $defaultEnvironments = [];
302 302
 
303 303
         if(isset($this->parsers[self::GROUPS]))
304 304
         {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Karma\Configuration;
6 6
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function enableIncludeSupport(): self
53 53
     {
54
-        if(! isset($this->parsers[self::INCLUDES]))
54
+        if( ! isset($this->parsers[self::INCLUDES]))
55 55
         {
56 56
             $this->parsers[self::INCLUDES] = new IncludeParser();
57 57
         }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function enableExternalSupport(): self
63 63
     {
64
-        if(! isset($this->parsers[self::EXTERNALS]))
64
+        if( ! isset($this->parsers[self::EXTERNALS]))
65 65
         {
66 66
             $this->parsers[self::EXTERNALS] = new ExternalParser(new Parser($this->fs));
67 67
         }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     public function enableGroupSupport(): self
73 73
     {
74
-        if(! isset($this->parsers[self::GROUPS]))
74
+        if( ! isset($this->parsers[self::GROUPS]))
75 75
         {
76 76
             $this->parsers[self::GROUPS] = new GroupParser();
77 77
         }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     {
105 105
         $files = array($masterFilePath);
106 106
 
107
-        while(! empty($files))
107
+        while( ! empty($files))
108 108
         {
109 109
             foreach($files as $file)
110 110
             {
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 
156 156
     private function extractLines(string $filePath): array
157 157
     {
158
-        if(! $this->fs->has($filePath))
158
+        if( ! $this->fs->has($filePath))
159 159
         {
160 160
             throw new \RuntimeException("$filePath does not exist");
161 161
         }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 
206 206
     private function switchSectionParser(string $sectionName): void
207 207
     {
208
-        if(! isset($this->parsers[$sectionName]))
208
+        if( ! isset($this->parsers[$sectionName]))
209 209
         {
210 210
             throw new \RuntimeException('Unknown section name ' . $sectionName);
211 211
         }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@
 block discarded – undo
182 182
 
183 183
     private function changeCurrentFile(string $filePath): void
184 184
     {
185
-        $this->info("Reading $filePath");
185
+        $this->info("reading $filePath");
186 186
 
187 187
         foreach($this->parsers as $parser)
188 188
         {
Please login to merge, or discard this patch.
src/Karma/Configuration/FileParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Karma\Configuration;
6 6
 
Please login to merge, or discard this patch.
src/Karma/Application.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 namespace Karma;
6 6
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
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
             }
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
         $this['target.fileSystem.adapter'] = $this->factory(function(Container $c) {
138 138
 
139
-            if(! empty($c['target.path']))
139
+            if( ! empty($c['target.path']))
140 140
             {
141 141
                 $c['hydrator.allowNonDistFilesOverwrite'] = true;
142 142
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
             return new \Psr\Log\NullLogger();
192 192
         });
193 193
 
194
-        $this['formatter.provider'] = function (Container $c) {
194
+        $this['formatter.provider'] = function(Container $c) {
195 195
             return new ProfileProvider($c['profile']);
196 196
         };
197 197
 
@@ -205,19 +205,19 @@  discard block
 block discarded – undo
205 205
             return $hydrator;
206 206
         });
207 207
 
208
-        $this['generator.nameTranslator'] = function (Container $c) {
208
+        $this['generator.nameTranslator'] = function(Container $c) {
209 209
             $translator = new FilePrefixTranslator();
210 210
             $translator->changeMasterFile($c['configuration.masterFile']);
211 211
 
212 212
             return $translator;
213 213
         };
214 214
 
215
-        $this['generator.variableProvider'] = $this->factory(function (Container $c) {
215
+        $this['generator.variableProvider'] = $this->factory(function(Container $c) {
216 216
             $provider = new VariableProvider($c['parser']);
217 217
 
218 218
             $profile = $c['profile'];
219 219
             $options = $profile->getGeneratorOptions();
220
-            if(! isset($options['translator']) || $options['translator'] === 'prefix')
220
+            if( ! isset($options['translator']) || $options['translator'] === 'prefix')
221 221
             {
222 222
                 $provider->setNameTranslator($c['generator.nameTranslator']);
223 223
             }
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
             return $provider;
226 226
         });
227 227
 
228
-        $this['configurationFilesGenerator'] = function (Container $c) {
228
+        $this['configurationFilesGenerator'] = function(Container $c) {
229 229
             return new YamlGenerator($c['sources.fileSystem'], $c['configuration'], $c['generator.variableProvider']);
230 230
         };
231 231
     }
Please login to merge, or discard this patch.