Passed
Pull Request — master (#102)
by Sébastien
03:51
created
src/Karma/FormatterProviders/ProfileProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,14 +29,14 @@
 block discarded – undo
29 29
 
30 30
     private function parseFormatters($content)
31 31
     {
32
-        if(! is_array($content))
32
+        if( ! is_array($content))
33 33
         {
34 34
             throw new \InvalidArgumentException('Syntax error in profile [formatters]');
35 35
         }
36 36
 
37 37
         foreach($content as $name => $rules)
38 38
         {
39
-            if(! is_array($rules))
39
+            if( ! is_array($rules))
40 40
             {
41 41
                 throw new \InvalidArgumentException('Syntax error in profile [formatters]');
42 42
             }
Please login to merge, or discard this patch.
src/Karma/Formatters/Rules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     {
50 50
         if($value === '<string>')
51 51
         {
52
-            $result = function ($value) use ($result) {
52
+            $result = function($value) use ($result) {
53 53
                 return str_replace('<string>', $value, $result);
54 54
             };
55 55
         }
Please login to merge, or discard this patch.
src/Karma/Generator/ConfigurationFileGenerators/YamlGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,12 +38,12 @@
 block discarded – undo
38 38
 
39 39
         foreach($parts as $part)
40 40
         {
41
-            if(! isset($current[$part]))
41
+            if( ! isset($current[$part]))
42 42
             {
43 43
                 $current[$part] = array();
44 44
             }
45 45
 
46
-            $current= & $current[$part];
46
+            $current = & $current[$part];
47 47
         }
48 48
 
49 49
         $current = $value;
Please login to merge, or discard this patch.
src/Karma/Hydrator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -193,12 +193,12 @@
 block discarded – undo
193 193
         $values = $this->readValueToInject($variable, $environment);
194 194
         $formatter = $this->getFormatterForCurrentTargetFile();
195 195
 
196
-        if(! is_array($values))
196
+        if( ! is_array($values))
197 197
         {
198 198
             $values = array($values);
199 199
         }
200 200
 
201
-        array_walk($values, function (& $value) use ($formatter) {
201
+        array_walk($values, function(& $value) use ($formatter) {
202 202
             $value = $formatter->format($value);
203 203
         });
204 204
 
Please login to merge, or discard this patch.
src/Karma/Logging/OutputAware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
         {
43 43
             if($verbosity <= $this->output->getVerbosity())
44 44
             {
45
-                if(! is_array($messages))
45
+                if( ! is_array($messages))
46 46
                 {
47 47
                     $messages = array($messages);
48 48
                 }
Please login to merge, or discard this patch.
src/Karma/VCS/Git.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
             $titleLineNumber = count($lines);
124 124
 
125 125
             // ensure an empty line preceeds comment
126
-            if(! empty($lines[$titleLineNumber - 1]))
126
+            if( ! empty($lines[$titleLineNumber - 1]))
127 127
             {
128 128
                 $lines[$titleLineNumber] = '';
129 129
                 $titleLineNumber++;
Please login to merge, or discard this patch.
src/Karma/VcsHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
             $rootPath = '';
65 65
         }
66 66
 
67
-        if(! empty($rootPath))
67
+        if( ! empty($rootPath))
68 68
         {
69 69
             $rootPath .= $directorySeparator;
70 70
         }
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
@@ -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
             }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
         $this['target.fileSystem.adapter'] = function($c) {
129 129
 
130
-            if(! empty($c['target.path']))
130
+            if( ! empty($c['target.path']))
131 131
             {
132 132
                 $c['hydrator.allowNonDistFilesOverwrite'] = true;
133 133
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
         $this['git'] = $git;
200 200
         $this['vcs'] = $git;
201 201
 
202
-        $this['vcsHandler'] = $this->protect(function (Vcs $vcs) {
202
+        $this['vcsHandler'] = $this->protect(function(Vcs $vcs) {
203 203
             $handler = new VcsHandler($vcs, $this['finder']);
204 204
 
205 205
             $handler->setLogger($this['logger'])
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
             return new \Psr\Log\NullLogger();
216 216
         });
217 217
 
218
-        $this['formatter.provider'] = $this->share(function ($c) {
218
+        $this['formatter.provider'] = $this->share(function($c) {
219 219
             return new ProfileProvider($c['profile']);
220 220
         });
221 221
 
@@ -229,19 +229,19 @@  discard block
 block discarded – undo
229 229
             return $hydrator;
230 230
         };
231 231
 
232
-        $this['generator.nameTranslator'] = $this->share(function ($c) {
232
+        $this['generator.nameTranslator'] = $this->share(function($c) {
233 233
             $translator = new FilePrefixTranslator();
234 234
             $translator->changeMasterFile($c['configuration.masterFile']);
235 235
 
236 236
             return $translator;
237 237
         });
238 238
 
239
-        $this['generator.variableProvider'] = function ($c) {
239
+        $this['generator.variableProvider'] = function($c) {
240 240
             $provider = new VariableProvider($c['parser'], $c['configuration.masterFile']);
241 241
 
242 242
             $profile = $c['profile'];
243 243
             $options = $profile->getGeneratorOptions();
244
-            if(! isset($options['translator']) || $options['translator'] === 'prefix')
244
+            if( ! isset($options['translator']) || $options['translator'] === 'prefix')
245 245
             {
246 246
                 $provider->setNameTranslator($c['generator.nameTranslator']);
247 247
             }
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
             return $provider;
250 250
         };
251 251
 
252
-        $this['configurationFilesGenerator'] = $this->share(function ($c) {
252
+        $this['configurationFilesGenerator'] = $this->share(function($c) {
253 253
             return new YamlGenerator($c['sources.fileSystem'], $c['configuration'], $c['generator.variableProvider']);
254 254
         });
255 255
     }
Please login to merge, or discard this patch.
src/Karma/ProfileReader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
         foreach(array_keys($this->attributes) as $name)
67 67
         {
68
-            if(! isset($values[$name]))
68
+            if( ! isset($values[$name]))
69 69
             {
70 70
                 continue;
71 71
             }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
             return true;
197 197
         }
198 198
 
199
-        if(! $parameterValidators[$parameter]($value))
199
+        if( ! $parameterValidators[$parameter]($value))
200 200
         {
201 201
             throw new \RuntimeException('Paramater %s format is invalid');
202 202
         }
Please login to merge, or discard this patch.