Passed
Push — main ( 19aca0...2840e2 )
by Gaetano
09:02
created
Core/Executor/ObjectStateGroupManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -248,10 +248,10 @@
 block discarded – undo
248 248
                 $names = array();
249 249
                 $descriptions = array();
250 250
                 foreach ($objectStateGroup->languageCodes as $languageCode) {
251
-                    $names[$languageCode] =  $objectStateGroup->getName($languageCode);
251
+                    $names[$languageCode] = $objectStateGroup->getName($languageCode);
252 252
                 }
253 253
                 foreach ($objectStateGroup->languageCodes as $languageCode) {
254
-                    $descriptions[$languageCode] =  $objectStateGroup->getDescription($languageCode);
254
+                    $descriptions[$languageCode] = $objectStateGroup->getDescription($languageCode);
255 255
                 }
256 256
                 $groupData = array_merge(
257 257
                     $groupData,
Please login to merge, or discard this patch.
Core/Executor/TagManager.php 1 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.
Command/StatusCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@
 block discarded – undo
232 232
 
233 233
         if ($input->getOption('todo')) {
234 234
             foreach ($data as $migrationData) {
235
-                $output->writeln("$migrationData", OutputInterface::OUTPUT_RAW|OutputInterface::VERBOSITY_QUIET);
235
+                $output->writeln("$migrationData", OutputInterface::OUTPUT_RAW | OutputInterface::VERBOSITY_QUIET);
236 236
             }
237 237
             return 0;
238 238
         }
Please login to merge, or discard this patch.
Core/Executor/MigrationExecutor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@
 block discarded – undo
178 178
                     return $this->matchConditions($values);
179 179
 
180 180
                 default:
181
-                    throw new InvalidStepDefinitionException("Unknown until condition: '$key' when suspending a migration ".var_export($conditions, true));
181
+                    throw new InvalidStepDefinitionException("Unknown until condition: '$key' when suspending a migration " . var_export($conditions, true));
182 182
             }
183 183
         }
184 184
     }
Please login to merge, or discard this patch.
Core/MigrationService.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
         }
311 311
 
312 312
         if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) {
313
-            throw new MigrationBundleException("Can not execute " . $this->getEntityName($migrationDefinition). " '{$migrationDefinition->name}': {$migrationDefinition->parsingError}");
313
+            throw new MigrationBundleException("Can not execute " . $this->getEntityName($migrationDefinition) . " '{$migrationDefinition->name}': {$migrationDefinition->parsingError}");
314 314
         }
315 315
 
316 316
         /// @todo add support for setting in $migrationContext a userContentType, userGroupContentType ?
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 
345 345
         try {
346 346
 
347
-            $i = $stepOffset+1;
347
+            $i = $stepOffset + 1;
348 348
             $finalStatus = Migration::STATUS_DONE;
349 349
             $finalMessage = null;
350 350
 
@@ -481,12 +481,12 @@  discard block
 block discarded – undo
481 481
     public function resumeMigration(Migration $migration, $useTransaction = true, array $forcedReferences = array())
482 482
     {
483 483
         if ($migration->status != Migration::STATUS_SUSPENDED) {
484
-            throw new MigrationBundleException("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': it is not in suspended status");
484
+            throw new MigrationBundleException("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': it is not in suspended status");
485 485
         }
486 486
 
487 487
         $migrationDefinitions = $this->getMigrationsDefinitions(array($migration->path));
488 488
         if (!count($migrationDefinitions)) {
489
-            throw new MigrationBundleException("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': its definition is missing");
489
+            throw new MigrationBundleException("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': its definition is missing");
490 490
         }
491 491
 
492 492
         $defs = $migrationDefinitions->getArrayCopy();
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
 
495 495
         $migrationDefinition = $this->parseMigrationDefinition($migrationDefinition);
496 496
         if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) {
497
-            throw new MigrationBundleException("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': {$migrationDefinition->parsingError}");
497
+            throw new MigrationBundleException("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': {$migrationDefinition->parsingError}");
498 498
         }
499 499
 
500 500
         // restore context
@@ -507,11 +507,11 @@  discard block
 block discarded – undo
507 507
         }
508 508
 
509 509
         if (!isset($this->migrationContext[$migration->name])) {
510
-            throw new MigrationBundleException("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': the stored context is missing");
510
+            throw new MigrationBundleException("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': the stored context is missing");
511 511
         }
512 512
         $restoredContext = $this->migrationContext[$migration->name];
513 513
         if (!is_array($restoredContext) || !isset($restoredContext['context']) || !isset($restoredContext['step'])) {
514
-            throw new MigrationBundleException("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': the stored context is invalid");
514
+            throw new MigrationBundleException("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': the stored context is invalid");
515 515
         }
516 516
 
517 517
         // update migration status
Please login to merge, or discard this patch.
Core/FieldHandler/EzDateAndTime.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,25 +58,25 @@
 block discarded – undo
58 58
     {
59 59
         $format = array();
60 60
         if (0 != $dateInterval->y) {
61
-            $format[] = $dateInterval->y.' years';
61
+            $format[] = $dateInterval->y . ' years';
62 62
         }
63 63
         if (0 != $dateInterval->m) {
64
-            $format[] = $dateInterval->m.' months';
64
+            $format[] = $dateInterval->m . ' months';
65 65
         }
66 66
         if (0 != $dateInterval->d) {
67
-            $format[] = $dateInterval->d.' days';
67
+            $format[] = $dateInterval->d . ' days';
68 68
         }
69 69
         //if (0 < $dateInterval->h || 0 < $dateInterval->i || 0 < $dateInterval->s) {
70 70
         //    $format .= 'T';
71 71
         //}
72 72
         if (0 != $dateInterval->h) {
73
-            $format[] = $dateInterval->h.' hours';
73
+            $format[] = $dateInterval->h . ' hours';
74 74
         }
75 75
         if (0 != $dateInterval->i) {
76
-            $format[] = $dateInterval->i.' minutes';
76
+            $format[] = $dateInterval->i . ' minutes';
77 77
         }
78 78
         if (0 != $dateInterval->s) {
79
-            $format[] = $dateInterval->s.' seconds';
79
+            $format[] = $dateInterval->s . ' seconds';
80 80
         }
81 81
         return implode(', ', $format);
82 82
     }
Please login to merge, or discard this patch.
Core/Matcher/ContentVersionMatcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace Kaliop\eZMigrationBundle\Core\Matcher;
4 4
 
5
-use eZ\Publish\API\Repository\Exceptions\UnauthorizedException ;
5
+use eZ\Publish\API\Repository\Exceptions\UnauthorizedException;
6 6
 use eZ\Publish\API\Repository\Repository;
7 7
 use eZ\Publish\API\Repository\Values\Content\Content;
8 8
 use eZ\Publish\API\Repository\Values\Content\VersionInfo;
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
                     }
212 212
                 } else {
213 213
                     // negative $acceptedVersionNo means 'leave the last X versions', eg: -1 = leave the last version
214
-                    if ($i < $contentVersionsCount + $acceptedVersionNo)  {
214
+                    if ($i < $contentVersionsCount + $acceptedVersionNo) {
215 215
                         $versions[$versionKey] = $versionInfo;
216 216
                         break;
217 217
 
Please login to merge, or discard this patch.
Core/Executor/MailExecutor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
         }
92 92
         if (isset($dsl['attach'])) {
93 93
             $paths = $this->resolveReferencesRecursively($dsl['attach']);
94
-            foreach((array)$paths as $path) {
94
+            foreach ((array)$paths as $path) {
95 95
                 // we use the same logic as for the image/file fields in content: look up file 1st relative to the migration
96 96
                 $attachment = dirname($context['path']) . '/' . $path;
97 97
                 if (!is_file($attachment)) {
Please login to merge, or discard this patch.
Core/Executor/ReferenceExecutor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             throw new MigrationBundleException("Invalid step definition: file '$fileName' for saving references already exists");
171 171
         }
172 172
 
173
-        if (! $this->referenceResolver instanceof EnumerableReferenceResolverInterface) {
173
+        if (!$this->referenceResolver instanceof EnumerableReferenceResolverInterface) {
174 174
             throw new MigrationBundleException("Can not save references as resolver is not enumerable");
175 175
         }
176 176
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         $value = $this->dumpVar($this->resolveReference($dsl['identifier']));
216 216
 
217 217
         if (isset($context['output']) && $context['output'] instanceof OutputInterface) {
218
-            $context['output']->write($label . $value, false, OutputInterface::OUTPUT_RAW|OutputInterface::VERBOSITY_NORMAL);
218
+            $context['output']->write($label . $value, false, OutputInterface::OUTPUT_RAW | OutputInterface::VERBOSITY_NORMAL);
219 219
         } else {
220 220
             echo $label . $value;
221 221
         }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 
238 238
         $dumper->dump(
239 239
             $cloner->cloneVar($var),
240
-            function ($line, $depth) use (&$output) {
240
+            function($line, $depth) use (&$output) {
241 241
                 // A negative depth means "end of dump"
242 242
                 if ($depth >= 0) {
243 243
                     // Adds a two spaces indentation to the line
Please login to merge, or discard this patch.