Completed
Push — nln-php7 ( 311875...6680df )
by Nicolas
11:20
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 3 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.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         {
147 147
             $processor->setSystemEnvironment($this->systemEnvironment);
148 148
 
149
-             $this->app['logger']->info(sprintf(
149
+                $this->app['logger']->info(sprintf(
150 150
                 'Hydrate <important>system</important> variables with <important>%s</important> values',
151 151
                 $this->systemEnvironment
152 152
             ));
@@ -197,9 +197,9 @@  discard block
 block discarded – undo
197 197
         foreach($overrides as $variable => $value)
198 198
         {
199 199
             $logger->info(sprintf(
200
-               'Override <important>%s</important> with value <important>%s</important>',
201
-               $variable,
202
-               $value
200
+                'Override <important>%s</important> with value <important>%s</important>',
201
+                $variable,
202
+                $value
203 203
             ));
204 204
 
205 205
             $value = $this->parseList($value);
@@ -216,9 +216,9 @@  discard block
 block discarded – undo
216 216
         foreach($data as $variable => $value)
217 217
         {
218 218
             $logger->info(sprintf(
219
-               'Set custom data <important>%s</important> with value <important>%s</important>',
220
-               $variable,
221
-               $value
219
+                'Set custom data <important>%s</important> with value <important>%s</important>',
220
+                $variable,
221
+                $value
222 222
             ));
223 223
 
224 224
             $reader->setCustomData($variable, $this->filterValue($value));
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/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 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
     private function writeLevel($level)
51 51
     {
52 52
         $message = str_pad(sprintf(
53
-           '[%s]',
54
-           strtoupper($level)
53
+            '[%s]',
54
+            strtoupper($level)
55 55
         ), 10);
56 56
 
57 57
         $this->output->write($this->colorizeMessage($level, $message));
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         if(isset($colors[$level]))
68 68
         {
69 69
             $message = sprintf(
70
-               '<%1$s>%2$s</%1$s>',
70
+                '<%1$s>%2$s</%1$s>',
71 71
                 'fg=' . $colors[$level],
72 72
                 $message
73 73
             );
Please login to merge, or discard this 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.
src/Logging/OutputAware.php 2 patches
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\Logging;
6 6
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         {
45 45
             if($verbosity <= $this->output->getVerbosity())
46 46
             {
47
-                if(! is_array($messages))
47
+                if( ! is_array($messages))
48 48
                 {
49 49
                     $messages = array($messages);
50 50
                 }
Please login to merge, or discard this patch.
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -38,6 +38,10 @@
 block discarded – undo
38 38
         return $this->write($messages, $newline, $type, OutputInterface::VERBOSITY_VERBOSE, 'white');
39 39
     }
40 40
 
41
+    /**
42
+     * @param boolean $newline
43
+     * @param string $textColor
44
+     */
41 45
     private function write($messages, $newline, $type, $verbosity, $textColor)
42 46
     {
43 47
         if($this->output instanceof OutputInterface)
Please login to merge, or discard this patch.