Passed
Push — nln-php7 ( 5c4f20...6ce259 )
by Nicolas
03:34
created
src/Configuration/AbstractReader.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -48,6 +48,9 @@
 block discarded – undo
48 48
         }
49 49
     }
50 50
 
51
+    /**
52
+     * @param string $environment
53
+     */
51 54
     public function getAllValuesForEnvironment(?string $environment = null): array
52 55
     {
53 56
         $result = [];
Please login to merge, or discard this 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(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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/Console/ConfigureActionCommand.php 2 patches
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -32,6 +32,11 @@  discard block
 block discarded – undo
32 32
     protected
33 33
         $environment;
34 34
 
35
+    /**
36
+     * @param string $name
37
+     * @param string $description
38
+     * @param string $outputTitle
39
+     */
35 40
     public function __construct(Application $app, $name, $description, $outputTitle)
36 41
     {
37 42
         $this->name = $name;
@@ -169,6 +174,9 @@  discard block
 block discarded – undo
169 174
         }
170 175
     }
171 176
 
177
+    /**
178
+     * @param string $optionName
179
+     */
172 180
     private function parseOptionWithAssignments(InputInterface $input, $optionName)
173 181
     {
174 182
         $strings = $input->getOption($optionName);
Please login to merge, or discard this 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\Console;
6 6
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             $sourcePath = $profile->getSourcePath();
108 108
         }
109 109
 
110
-        if(! is_array($sourcePath))
110
+        if( ! is_array($sourcePath))
111 111
         {
112 112
             $sourcePath = [$sourcePath];
113 113
         }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     {
174 174
         $strings = $input->getOption($optionName);
175 175
 
176
-        if(! is_array($strings))
176
+        if( ! is_array($strings))
177 177
         {
178 178
             $strings = [$strings];
179 179
         }
Please login to merge, or discard this patch.
src/Hydrator.php 2 patches
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -253,6 +253,10 @@  discard block
 block discarded – undo
253 253
         }
254 254
     }
255 255
 
256
+    /**
257
+     * @param string $environment
258
+     * @param string $delimiter
259
+     */
256 260
     private function generateContentForListDirective($variable, $environment, $delimiter, array $wrapper)
257 261
     {
258 262
         $values = $this->readValueToInject($variable, $environment);
@@ -276,11 +280,19 @@  discard block
 block discarded – undo
276 280
         );
277 281
     }
278 282
 
283
+    /**
284
+     * @param string $fileContent
285
+     */
279 286
     private function removeFileDirectives($fileContent)
280 287
     {
281 288
         return preg_replace('~(<%\s*karma:[^%]*%>\s*)~i', '', $fileContent);
282 289
     }
283 290
 
291
+    /**
292
+     * @param string $sourceFile
293
+     * @param string $content
294
+     * @param string $environment
295
+     */
284 296
     private function injectValues($sourceFile, $content, $environment, $replacementCounter = 0)
285 297
     {
286 298
         $replacementCounter += $this->injectScalarValues($content, $environment);
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 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
 
@@ -258,12 +258,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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",
Please login to merge, or discard this patch.
src/Formatter.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;
6 6
 
Please login to merge, or discard this patch.
src/Filters/FileFilterIterator.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\Filters;
6 6
 
Please login to merge, or discard this patch.
src/FormattersDefinition.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;
6 6
 
Please login to merge, or discard this patch.
src/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 = [$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
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
             return new \Psr\Log\NullLogger();
210 210
         });
211 211
 
212
-        $this['formatter.provider'] = function (Container $c) {
212
+        $this['formatter.provider'] = function(Container $c) {
213 213
             return new ProfileProvider($c['profile']);
214 214
         };
215 215
 
@@ -223,19 +223,19 @@  discard block
 block discarded – undo
223 223
             return $hydrator;
224 224
         });
225 225
 
226
-        $this['generator.nameTranslator'] = function (Container $c) {
226
+        $this['generator.nameTranslator'] = function(Container $c) {
227 227
             $translator = new FilePrefixTranslator();
228 228
             $translator->changeMasterFile($c['configuration.masterFile']);
229 229
 
230 230
             return $translator;
231 231
         };
232 232
 
233
-        $this['generator.variableProvider'] = $this->factory(function (Container $c) {
233
+        $this['generator.variableProvider'] = $this->factory(function(Container $c) {
234 234
             $provider = new VariableProvider($c['parser']);
235 235
 
236 236
             $profile = $c['profile'];
237 237
             $options = $profile->getGeneratorOptions();
238
-            if(! isset($options['translator']) || $options['translator'] === 'prefix')
238
+            if( ! isset($options['translator']) || $options['translator'] === 'prefix')
239 239
             {
240 240
                 $provider->setNameTranslator($c['generator.nameTranslator']);
241 241
             }
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
             return $provider;
244 244
         });
245 245
 
246
-        $this['configurationFilesGenerator'] = function (Container $c) {
246
+        $this['configurationFilesGenerator'] = function(Container $c) {
247 247
             return new YamlGenerator($c['generate.sources.fileSystem'], $c['configuration'], $c['generator.variableProvider']);
248 248
         };
249 249
     }
Please login to merge, or discard this patch.
src/Logging/OutputInterfaceAdapter.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\Logging;
6 6
 
Please login to merge, or discard this patch.
src/Logging/LoggerAware.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\Logging;
6 6
 
Please login to merge, or discard this patch.