Passed
Push — main ( f5469f...da64a4 )
by Gaetano
07:28
created
Core/MigrationService.php 1 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.