Passed
Push — nln-php7 ( 12eaac )
by Nicolas
05:28
created
src/Karma/Command/ConfigureActionCommand.php 2 patches
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -30,6 +30,11 @@  discard block
 block discarded – undo
30 30
     protected
31 31
         $environment;
32 32
 
33
+    /**
34
+     * @param string $name
35
+     * @param string $description
36
+     * @param string $outputTitle
37
+     */
33 38
     public function __construct(Application $app, $name, $description, $outputTitle)
34 39
     {
35 40
         $this->name = $name;
@@ -128,6 +133,10 @@  discard block
 block discarded – undo
128 133
     }
129 134
 
130 135
     abstract protected function launchConfigurationAction(ConfigurableProcessor $processor);
136
+
137
+    /**
138
+     * @return ConfigurableProcessor
139
+     */
131 140
     abstract protected function getProcessor();
132 141
 
133 142
     private function configureProcessor(ConfigurableProcessor $processor)
@@ -153,6 +162,9 @@  discard block
 block discarded – undo
153 162
         }
154 163
     }
155 164
 
165
+    /**
166
+     * @param string $optionName
167
+     */
156 168
     private function parseOptionWithAssignments(InputInterface $input, $optionName)
157 169
     {
158 170
         $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\Command;
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 = array($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 = array($strings);
179 179
         }
Please login to merge, or discard this patch.
src/Karma/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/Karma/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/Karma/FormatterProviders/NullProvider.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\FormatterProviders;
6 6
 
Please login to merge, or discard this patch.
src/Karma/FormatterProviders/CallbackProvider.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\FormatterProviders;
6 6
 
Please login to merge, or discard this patch.
src/Karma/FormatterProviders/ProfileProvider.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\FormatterProviders;
6 6
 
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
 
33 33
     private function parseFormatters($content): void
34 34
     {
35
-        if(! is_array($content))
35
+        if( ! is_array($content))
36 36
         {
37 37
             throw new \InvalidArgumentException('Syntax error in profile [formatters]');
38 38
         }
39 39
 
40 40
         foreach($content as $name => $rules)
41 41
         {
42
-            if(! is_array($rules))
42
+            if( ! is_array($rules))
43 43
             {
44 44
                 throw new \InvalidArgumentException('Syntax error in profile [formatters]');
45 45
             }
Please login to merge, or discard this patch.
src/Karma/Finder.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/Karma/ProfileReader.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;
6 6
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
198 198
             return true;
199 199
         }
200 200
 
201
-        if(! $parameterValidators[$parameter]($value))
201
+        if( ! $parameterValidators[$parameter]($value))
202 202
         {
203 203
             throw new \RuntimeException('Paramater %s format is invalid');
204 204
         }
Please login to merge, or discard this patch.
src/Karma/Configuration.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.