Passed
Push — main ( 2c998d...d5afb4 )
by Gaetano
08:40
created
Command/MigrationCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
 
96 96
             $output->writeln('<info>Migration: ' . $migration->name . '</info>');
97 97
             $output->writeln('Status: ' . $status);
98
-            $output->writeln('Executed on: <info>' . ($migration->executionDate != null ? date("Y-m-d H:i:s", $migration->executionDate) : '--'). '</info>');
98
+            $output->writeln('Executed on: <info>' . ($migration->executionDate != null ? date("Y-m-d H:i:s", $migration->executionDate) : '--') . '</info>');
99 99
             $output->writeln('Execution notes: <info>' . $migration->executionError . '</info>');
100 100
 
101 101
             if ($migration->status == Migration::STATUS_SUSPENDED) {
Please login to merge, or discard this patch.
Core/Helper/ProcessManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         $currentProcesses = array_splice($processesQueue, 0, $maxParallel);
29 29
         // start the initial stack of processes
30 30
         foreach ($currentProcesses as $process) {
31
-            $process->start(function ($type, $buffer) use ($callback, $process) {
31
+            $process->start(function($type, $buffer) use ($callback, $process) {
32 32
                 if ($callback) {
33 33
                     $callback($type, $buffer, $process);
34 34
                 }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                     // directly add and start new process after the previous finished
45 45
                     if (count($processesQueue) > 0) {
46 46
                         $nextProcess = array_shift($processesQueue);
47
-                        $nextProcess->start(function ($type, $buffer) use ($callback, $nextProcess) {
47
+                        $nextProcess->start(function($type, $buffer) use ($callback, $nextProcess) {
48 48
                             if ($callback) {
49 49
                                 $callback($type, $buffer, $nextProcess);
50 50
                             }
Please login to merge, or discard this patch.
Core/ReferenceResolver/EmbeddedRegexpReferenceResolverTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     public function hasEmbeddedReferences($string)
19 19
     {
20 20
         $regexp = $this->getEmbeddedRegexp();
21
-        return (bool) preg_match_all($regexp, $string, $matches);
21
+        return (bool)preg_match_all($regexp, $string, $matches);
22 22
     }
23 23
     
24 24
     /**
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     {
53 53
         // we need to alter the regexp we usr for std ref resolving, as it will be used to match parts of text, not the whole string
54 54
         $regexp = substr($this->getRegexp(), 1, -1);
55
-        return '/' . preg_quote($this->beginToken). preg_replace(array('/^\^/'), array(''), $regexp) . '[^' . $this->endToken . ']+' . preg_quote($this->endToken) . '/';
55
+        return '/' . preg_quote($this->beginToken) . preg_replace(array('/^\^/'), array(''), $regexp) . '[^' . $this->endToken . ']+' . preg_quote($this->endToken) . '/';
56 56
     }
57 57
 
58 58
     /**
Please login to merge, or discard this patch.
Core/Process/Process.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
     public static function forceSigchildEnabled($force)
16 16
     {
17
-        self::$forceSigchildEnabled = (bool) $force;
17
+        self::$forceSigchildEnabled = (bool)$force;
18 18
     }
19 19
 
20 20
     protected function isSigchildEnabled()
Please login to merge, or discard this patch.
Core/Process/ProcessBuilder.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,23 +22,23 @@
 block discarded – undo
22 22
     public function getProcess()
23 23
     {
24 24
         $parentClass = get_parent_class($this);
25
-        $this_prefix = \Closure::bind(function(ProcessBuilder $builder){return $builder->prefix;}, null, $parentClass);
25
+        $this_prefix = \Closure::bind(function(ProcessBuilder $builder) {return $builder->prefix; }, null, $parentClass);
26 26
         $this_prefix = $this_prefix($this);
27
-        $this_arguments = \Closure::bind(function(ProcessBuilder $builder){return $builder->arguments;}, null, $parentClass);
27
+        $this_arguments = \Closure::bind(function(ProcessBuilder $builder) {return $builder->arguments; }, null, $parentClass);
28 28
         $this_arguments = $this_arguments($this);
29
-        $this_options = \Closure::bind(function(ProcessBuilder $builder){return $builder->options;}, null, $parentClass);
29
+        $this_options = \Closure::bind(function(ProcessBuilder $builder) {return $builder->options; }, null, $parentClass);
30 30
         $this_options = $this_options($this);
31
-        $this_inheritEnv = \Closure::bind(function(ProcessBuilder $builder){return $builder->inheritEnv;}, null, $parentClass);
31
+        $this_inheritEnv = \Closure::bind(function(ProcessBuilder $builder) {return $builder->inheritEnv; }, null, $parentClass);
32 32
         $this_inheritEnv = $this_inheritEnv($this);
33
-        $this_env = \Closure::bind(function(ProcessBuilder $builder){return $builder->env;}, null, $parentClass);
33
+        $this_env = \Closure::bind(function(ProcessBuilder $builder) {return $builder->env; }, null, $parentClass);
34 34
         $this_env = $this_env($this);
35
-        $this_cwd = \Closure::bind(function(ProcessBuilder $builder){return $builder->cwd;}, null, $parentClass);
35
+        $this_cwd = \Closure::bind(function(ProcessBuilder $builder) {return $builder->cwd; }, null, $parentClass);
36 36
         $this_cwd = $this_cwd($this);
37
-        $this_input = \Closure::bind(function(ProcessBuilder $builder){return $builder->input;}, null, $parentClass);
37
+        $this_input = \Closure::bind(function(ProcessBuilder $builder) {return $builder->input; }, null, $parentClass);
38 38
         $this_input = $this_input($this);
39
-        $this_timeout = \Closure::bind(function(ProcessBuilder $builder){return $builder->timeout;}, null, $parentClass);
39
+        $this_timeout = \Closure::bind(function(ProcessBuilder $builder) {return $builder->timeout; }, null, $parentClass);
40 40
         $this_timeout = $this_timeout($this);
41
-        $this_outputDisabled = \Closure::bind(function(ProcessBuilder $builder){return $builder->outputDisabled;}, null, $parentClass);
41
+        $this_outputDisabled = \Closure::bind(function(ProcessBuilder $builder) {return $builder->outputDisabled; }, null, $parentClass);
42 42
         $this_outputDisabled = $this_outputDisabled($this);
43 43
 
44 44
         if (0 === count($this_prefix) && 0 === count($this_arguments)) {
Please login to merge, or discard this patch.
Command/AbstractCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,8 +78,7 @@
 block discarded – undo
78 78
                 $this->errOutput->setVerbosity(OutputInterface::VERBOSITY_NORMAL);
79 79
                 $this->errOutput->writeln($message, $type);
80 80
                 $this->errOutput->setVerbosity(OutputInterface::VERBOSITY_QUIET);
81
-            }
82
-            else
81
+            } else
83 82
             {
84 83
                 $this->errOutput->writeln($message, $type);
85 84
             }
Please login to merge, or discard this patch.
Core/Executor/TagManager.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -162,7 +162,9 @@  discard block
 block discarded – undo
162 162
         // sort tags by depth so that there will be no errors in case we are deleting parent and child
163 163
         $tagsCollection = $tagsCollection->getArrayCopy();
164 164
         uasort($tagsCollection, function ($t1, $t2) {
165
-            if ($t1->depth == $t2->depth) return 0;
165
+            if ($t1->depth == $t2->depth) {
166
+                return 0;
167
+            }
166 168
             return ($t1->depth > $t2->depth) ? -1 : 1;
167 169
         });
168 170
 
@@ -267,7 +269,9 @@  discard block
 block discarded – undo
267 269
                 // sort top to bottom
268 270
                 $tagCollection = $tagCollection->getArrayCopy();
269 271
                 uasort($tagCollection, function ($t1, $t2) {
270
-                    if ($t1->depth == $t2->depth) return 0;
272
+                    if ($t1->depth == $t2->depth) {
273
+                        return 0;
274
+                    }
271 275
                     return ($t1->depth > $t2->depth) ? 1 : -1;
272 276
                 });
273 277
                 break;
@@ -275,7 +279,9 @@  discard block
 block discarded – undo
275 279
                 // sort bottom to top
276 280
                 $tagCollection = $tagCollection->getArrayCopy();
277 281
                 uasort($tagCollection, function ($t1, $t2) {
278
-                    if ($t1->depth == $t2->depth) return 0;
282
+                    if ($t1->depth == $t2->depth) {
283
+                        return 0;
284
+                    }
279 285
                     return ($t1->depth > $t2->depth) ? -1 : 1;
280 286
                 });
281 287
                 break;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
         // sort tags by depth so that there will be no errors in case we are deleting parent and child
167 167
         $tagsCollection = $tagsCollection->getArrayCopy();
168
-        uasort($tagsCollection, function ($t1, $t2) {
168
+        uasort($tagsCollection, function($t1, $t2) {
169 169
             if ($t1->depth == $t2->depth) return 0;
170 170
             return ($t1->depth > $t2->depth) ? -1 : 1;
171 171
         });
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
             case 'create':
273 273
                 // sort top to bottom
274 274
                 $tagCollection = $tagCollection->getArrayCopy();
275
-                uasort($tagCollection, function ($t1, $t2) {
275
+                uasort($tagCollection, function($t1, $t2) {
276 276
                     if ($t1->depth == $t2->depth) return 0;
277 277
                     return ($t1->depth > $t2->depth) ? 1 : -1;
278 278
                 });
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
             case 'delete':
281 281
                 // sort bottom to top
282 282
                 $tagCollection = $tagCollection->getArrayCopy();
283
-                uasort($tagCollection, function ($t1, $t2) {
283
+                uasort($tagCollection, function($t1, $t2) {
284 284
                     if ($t1->depth == $t2->depth) return 0;
285 285
                     return ($t1->depth > $t2->depth) ? -1 : 1;
286 286
                 });
Please login to merge, or discard this patch.
Core/Matcher/TrashMatcher.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,9 @@
 block discarded – undo
56 56
 
57 57
             $query = new Query();
58 58
             $query->limit = $this->queryLimit;
59
-            if (isset($query->performCount)) $query->performCount = false;
59
+            if (isset($query->performCount)) {
60
+                $query->performCount = false;
61
+            }
60 62
             $query->filter = $this->getQueryCriterion($key, $values);
61 63
             $results = $this->repository->getTrashService()->findTrashItems($query);
62 64
 
Please login to merge, or discard this patch.
Core/MigrationService.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -599,8 +599,9 @@
 block discarded – undo
599 599
      */
600 600
     public function getCurrentContext($migrationName)
601 601
     {
602
-        if (!isset($this->migrationContext[$migrationName]))
603
-            return null;
602
+        if (!isset($this->migrationContext[$migrationName])) {
603
+                    return null;
604
+        }
604 605
         $context = $this->migrationContext[$migrationName];
605 606
         // avoid attempting to store the current outputInterface when saving the context
606 607
         if (isset($context['output'])) {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
         }
315 315
 
316 316
         if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) {
317
-            throw new MigrationBundleException("Can not execute " . $this->getEntityName($migrationDefinition). " '{$migrationDefinition->name}': {$migrationDefinition->parsingError}");
317
+            throw new MigrationBundleException("Can not execute " . $this->getEntityName($migrationDefinition) . " '{$migrationDefinition->name}': {$migrationDefinition->parsingError}");
318 318
         }
319 319
 
320 320
         // BC: handling of legacy method call signature
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 
383 383
         try {
384 384
 
385
-            $i = $stepOffset+1;
385
+            $i = $stepOffset + 1;
386 386
             $finalStatus = Migration::STATUS_DONE;
387 387
             $finalMessage = '';
388 388
 
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
                 $finalMessage = "Suspended in execution of step $i: " . $e->getMessage();
434 434
             }
435 435
 
436
-            $finalMessage = ($finalMessage != '' && $messageSuffix != '') ? $finalMessage . '. '. $messageSuffix : $finalMessage . $messageSuffix;
436
+            $finalMessage = ($finalMessage != '' && $messageSuffix != '') ? $finalMessage . '. ' . $messageSuffix : $finalMessage . $messageSuffix;
437 437
 
438 438
             // in case we have an exception thrown in the commit phase after the last step, make sure we report the correct step
439 439
             $i--;
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
                 }
492 492
             }
493 493
 
494
-            $errorMessage = ($errorMessage != '' && $messageSuffix != '') ? $errorMessage . '. '. $messageSuffix : $errorMessage . $messageSuffix;
494
+            $errorMessage = ($errorMessage != '' && $messageSuffix != '') ? $errorMessage . '. ' . $messageSuffix : $errorMessage . $messageSuffix;
495 495
 
496 496
             // set migration as failed
497 497
             // NB: we use the 'force' flag here because we might be catching an exception happened during the call to
@@ -534,12 +534,12 @@  discard block
 block discarded – undo
534 534
         }
535 535
 
536 536
         if ($migration->status != Migration::STATUS_SUSPENDED) {
537
-            throw new MigrationBundleException("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': it is not in suspended status");
537
+            throw new MigrationBundleException("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': it is not in suspended status");
538 538
         }
539 539
 
540 540
         $migrationDefinitions = $this->getMigrationsDefinitions(array($migration->path));
541 541
         if (!count($migrationDefinitions)) {
542
-            throw new MigrationBundleException("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': its definition is missing");
542
+            throw new MigrationBundleException("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': its definition is missing");
543 543
         }
544 544
 
545 545
         $defs = $migrationDefinitions->getArrayCopy();
@@ -547,17 +547,17 @@  discard block
 block discarded – undo
547 547
 
548 548
         $migrationDefinition = $this->parseMigrationDefinition($migrationDefinition);
549 549
         if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) {
550
-            throw new MigrationBundleException("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': {$migrationDefinition->parsingError}");
550
+            throw new MigrationBundleException("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': {$migrationDefinition->parsingError}");
551 551
         }
552 552
 
553 553
         // restore context
554 554
         $this->contextHandler->restoreCurrentContext($migration->name);
555 555
         if (!isset($this->migrationContext[$migration->name])) {
556
-            throw new MigrationBundleException("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': the stored context is missing");
556
+            throw new MigrationBundleException("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': the stored context is missing");
557 557
         }
558 558
         $restoredContext = $this->migrationContext[$migration->name];
559 559
         if (!is_array($restoredContext) || !isset($restoredContext['context']) || !isset($restoredContext['step'])) {
560
-            throw new MigrationBundleException("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': the stored context is invalid");
560
+            throw new MigrationBundleException("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': the stored context is invalid");
561 561
         }
562 562
 
563 563
         // update migration status
Please login to merge, or discard this patch.