Passed
Push — master ( cf7f72...6fa9cc )
by Gaetano
04:14
created
Core/FieldHandler/FileFieldHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     protected $ioDecorator;
11 11
     protected $ioService;
12 12
 
13
-    public function __construct($ioRootDir, UrlDecorator $ioDecorator=null, $ioService=null)
13
+    public function __construct($ioRootDir, UrlDecorator $ioDecorator = null, $ioService = null)
14 14
     {
15 15
         $this->ioRootDir = $ioRootDir;
16 16
         $this->ioDecorator = $ioDecorator;
Please login to merge, or discard this patch.
Command/StatusCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         // which is misleading. We add the following loop to fix that, so that the status command will match more closely
94 94
         // the 'migrate' command
95 95
         if (count($paths)) {
96
-            foreach($index as $migrationName => $data) {
96
+            foreach ($index as $migrationName => $data) {
97 97
                 if (!isset($data['migration'])) {
98 98
                     $migration = $migrationsService->getMigration($migrationName);
99 99
                     if ($migration !== null) {
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 
232 232
         if ($input->getOption('todo')) {
233 233
             foreach ($data as $migrationData) {
234
-                $output->writeln("$migrationData", OutputInterface::OUTPUT_RAW|OutputInterface::VERBOSITY_QUIET);
234
+                $output->writeln("$migrationData", OutputInterface::OUTPUT_RAW | OutputInterface::VERBOSITY_QUIET);
235 235
             }
236 236
             return 0;
237 237
         }
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
      */
261 261
     protected function sortMigrationIndex(array &$index, $sortBy)
262 262
     {
263
-        switch($sortBy) {
263
+        switch ($sortBy) {
264 264
             case 'execution':
265 265
                 uasort($index, function($m1, $m2) {
266 266
                     if (isset($m1['migration']) && $m1['migration']->executionDate !== null) {
Please login to merge, or discard this patch.
Command/MigrateCommand.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                 $prefix = array($php);
120 120
 
121 121
                 if ($input->getOption('child-process-php-ini-config')) {
122
-                    foreach($input->getOption('child-process-php-ini-config') as $iniSpec) {
122
+                    foreach ($input->getOption('child-process-php-ini-config') as $iniSpec) {
123 123
                         $ini = explode(':', $iniSpec, 2);
124 124
                         if (count($ini) < 2 || $ini[0] === '') {
125 125
                             throw new \Exception("Invalid php ini specification: '$iniSpec'");
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
         if ($input->getOption('set-reference') && !$input->getOption('separate-process')) {
147 147
             $refResolver = $this->getContainer()->get('ez_migration_bundle.reference_resolver.customreference');
148
-            foreach($input->getOption('set-reference') as $refSpec) {
148
+            foreach ($input->getOption('set-reference') as $refSpec) {
149 149
                 $ref = explode(':', $refSpec, 2);
150 150
                 if (count($ref) < 2 || $ref[0] === '') {
151 151
                     throw new \Exception("Invalid reference specification: '$refSpec'");
@@ -246,9 +246,9 @@  discard block
 block discarded – undo
246 246
         $time = microtime(true) - $start;
247 247
         if ($input->getOption('separate-process')) {
248 248
             // in case of using subprocesses, we can not measure max memory used
249
-            $this->writeln("<info>Time taken: ".sprintf('%.3f', $time)." secs</info>");
249
+            $this->writeln("<info>Time taken: " . sprintf('%.3f', $time) . " secs</info>");
250 250
         } else {
251
-            $this->writeln("<info>Time taken: ".sprintf('%.3f', $time)." secs, memory: ".sprintf('%.2f', (memory_get_peak_usage(true) / 1000000)). ' MB</info>');
251
+            $this->writeln("<info>Time taken: " . sprintf('%.3f', $time) . " secs, memory: " . sprintf('%.2f', (memory_get_peak_usage(true) / 1000000)) . ' MB</info>');
252 252
         }
253 253
 
254 254
         return $failed;
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
             $builderArgs[] = '--no-debug';
481 481
         }
482 482
         if ($input->getOption('siteaccess')) {
483
-            $builderArgs[] = '--siteaccess='.$input->getOption('siteaccess');
483
+            $builderArgs[] = '--siteaccess=' . $input->getOption('siteaccess');
484 484
         }
485 485
         switch ($this->verbosity) {
486 486
             case OutputInterface::VERBOSITY_VERBOSE:
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
             $builderArgs[] = '--no-transactions';
513 513
         }
514 514
         if ($input->getOption('set-reference')) {
515
-            foreach($input->getOption('set-reference') as $refSpec) {
515
+            foreach ($input->getOption('set-reference') as $refSpec) {
516 516
                 $builderArgs[] = '--set-reference=' . $refSpec;
517 517
             }
518 518
         }
Please login to merge, or discard this patch.
Core/ReferenceResolver/ExpressionResolver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,12 +44,12 @@
 block discarded – undo
44 44
         return array(
45 45
             new ExpressionFunction(
46 46
                 'resolve',
47
-                function ($str) {
47
+                function($str) {
48 48
                     /// @todo we could implement this via eg a static class var which holds a pointer to $this->referenceResolver
49 49
                     //return sprintf('(is_string(%1$s) ? FakerResolver::resolveExpressionLanguageReference(%1$s) : %1$s)', $str);
50 50
                     return "throw new \Exception('The \'resolve\' expression language operator can not be compiled, only evaluated'";
51 51
                 },
52
-                function ($arguments, $str) use ($resolver) {
52
+                function($arguments, $str) use ($resolver) {
53 53
                     if (!is_string($str)) {
54 54
                         return $str;
55 55
                     }
Please login to merge, or discard this patch.
Core/ReferenceResolver/ChainResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
         $refs = array();
132 132
 
133 133
         foreach ($this->resolvers as $resolver) {
134
-            if (! $resolver instanceof EnumerableReferenceResolverInterface) {
134
+            if (!$resolver instanceof EnumerableReferenceResolverInterface) {
135 135
                 // Disabled - we now allow chaining enumerable and non-enumerable sets
136 136
                 //throw new \Exception("Could not enumerate references because of chained resolver of type: " . get_class($resolver));
137 137
                 continue;
Please login to merge, or discard this patch.
Core/Executor/BasePHPExecutor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 
85 85
             $args = $dsl['arguments'];
86 86
 
87
-            foreach($args as &$val) {
87
+            foreach ($args as &$val) {
88 88
                 $val = $this->resolveReferencesRecursively($val);
89 89
             }
90 90
         } else {
Please login to merge, or discard this patch.
Core/Executor/HTTPExecutor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
         $body = isset($dsl['body']) ? $this->resolveReferencesInText($dsl['body']) : null;
76 76
 
77 77
         if (isset($dsl['client'])) {
78
-            $client = $this->container->get('httplug.client.'.$this->referenceResolver->resolveReference($dsl['client']));
78
+            $client = $this->container->get('httplug.client.' . $this->referenceResolver->resolveReference($dsl['client']));
79 79
         } else {
80 80
             $client = $this->container->get('httplug.client');
81 81
         }
Please login to merge, or discard this patch.
Core/Executor/LoopExecutor.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
                     $subStep = new MigrationStep($type, $stepDef, array_merge($context, array()));
100 100
                     try {
101 101
                         $result = $stepExecutors[$j]->execute($subStep);
102
-                    } catch(MigrationStepSkippedException $e) {
102
+                    } catch (MigrationStepSkippedException $e) {
103 103
                         // all ok, continue the loop
104
-                    } catch(LoopContinueException $e) {
104
+                    } catch (LoopContinueException $e) {
105 105
                         // all ok, move to the next iteration
106 106
                         break;
107 107
                     }
108 108
                 }
109
-            } catch(LoopBreakException $e) {
109
+            } catch (LoopBreakException $e) {
110 110
                 // all ok, exit the loop
111 111
                 break;
112 112
             }
@@ -135,14 +135,14 @@  discard block
 block discarded – undo
135 135
                     $subStep = new MigrationStep($type, $stepDef, array_merge($context, array()));
136 136
                     try {
137 137
                         $result = $stepExecutors[$j]->execute($subStep);
138
-                    } catch(MigrationStepSkippedException $e) {
138
+                    } catch (MigrationStepSkippedException $e) {
139 139
                         // all ok, continue the loop
140
-                    } catch(LoopContinueException $e) {
140
+                    } catch (LoopContinueException $e) {
141 141
                         // all ok, move to the next iteration
142 142
                         break;
143 143
                     }
144 144
                 }
145
-            } catch(LoopBreakException $e) {
145
+            } catch (LoopBreakException $e) {
146 146
                 // all ok, exit the loop
147 147
                 break;
148 148
             }
Please login to merge, or discard this patch.
Core/Executor/ProcessExecutor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
         $builderArgs = array($this->referenceResolver->resolveReference($dsl['command']));
72 72
 
73 73
         if (isset($dsl['arguments'])) {
74
-            foreach($dsl['arguments'] as $arg) {
74
+            foreach ($dsl['arguments'] as $arg) {
75 75
                 /// @todo should this be recursive?
76 76
                 $builderArgs[] = $this->referenceResolver->resolveReference($arg);
77 77
             }
Please login to merge, or discard this patch.