Passed
Push — master ( 4bc51d...8ffde0 )
by Gaetano
07:18
created
Core/Executor/TagManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
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
-        uasort($tagsCollection, function ($t1, $t2) {
164
+        uasort($tagsCollection, function($t1, $t2) {
165 165
             if ($t1->depth == $t2->depth) return 0;
166 166
             return ($t1->depth > $t2->depth) ? -1 : 1;
167 167
         });
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
             case 'create':
267 267
                 // sort top to bottom
268 268
                 $tagCollection = $tagCollection->getArrayCopy();
269
-                uasort($tagCollection, function ($t1, $t2) {
269
+                uasort($tagCollection, function($t1, $t2) {
270 270
                     if ($t1->depth == $t2->depth) return 0;
271 271
                     return ($t1->depth > $t2->depth) ? 1 : -1;
272 272
                 });
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
             case 'delete':
275 275
                 // sort bottom to top
276 276
                 $tagCollection = $tagCollection->getArrayCopy();
277
-                uasort($tagCollection, function ($t1, $t2) {
277
+                uasort($tagCollection, function($t1, $t2) {
278 278
                     if ($t1->depth == $t2->depth) return 0;
279 279
                     return ($t1->depth > $t2->depth) ? -1 : 1;
280 280
                 });
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
     protected function getTagKeywords($tag)
353 353
     {
354 354
         $out = array();
355
-        foreach($tag->languageCodes as $languageCode) {
355
+        foreach ($tag->languageCodes as $languageCode) {
356 356
             $out[$languageCode] = $tag->getKeyword($languageCode);
357 357
         }
358 358
         return $out;
Please login to merge, or discard this patch.
Core/Matcher/TagMatcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
             $childTags = $this->findTagsByParentTagIds(array_keys($parentTags));
157 157
             $tags = array_merge($tags, $childTags);
158 158
             $parentTags = $childTags;
159
-        } while (count( $childTags ) > 0);
159
+        } while (count($childTags) > 0);
160 160
 
161 161
         return $tags;
162 162
     }
Please login to merge, or discard this patch.
Core/MigrationService.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
         }
265 265
 
266 266
         if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) {
267
-            throw new \Exception("Can not execute " . $this->getEntityName($migrationDefinition). " '{$migrationDefinition->name}': {$migrationDefinition->parsingError}");
267
+            throw new \Exception("Can not execute " . $this->getEntityName($migrationDefinition) . " '{$migrationDefinition->name}': {$migrationDefinition->parsingError}");
268 268
         }
269 269
 
270 270
         /// @todo add support for setting in $migrationContext a userContentType, userGroupContentType ?
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 
299 299
         try {
300 300
 
301
-            $i = $stepOffset+1;
301
+            $i = $stepOffset + 1;
302 302
             $finalStatus = Migration::STATUS_DONE;
303 303
             $finalMessage = null;
304 304
 
@@ -433,12 +433,12 @@  discard block
 block discarded – undo
433 433
     public function resumeMigration(Migration $migration, $useTransaction = true)
434 434
     {
435 435
         if ($migration->status != Migration::STATUS_SUSPENDED) {
436
-            throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': it is not in suspended status");
436
+            throw new \Exception("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': it is not in suspended status");
437 437
         }
438 438
 
439 439
         $migrationDefinitions = $this->getMigrationsDefinitions(array($migration->path));
440 440
         if (!count($migrationDefinitions)) {
441
-            throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': its definition is missing");
441
+            throw new \Exception("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': its definition is missing");
442 442
         }
443 443
 
444 444
         $defs = $migrationDefinitions->getArrayCopy();
@@ -446,18 +446,18 @@  discard block
 block discarded – undo
446 446
 
447 447
         $migrationDefinition = $this->parseMigrationDefinition($migrationDefinition);
448 448
         if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) {
449
-            throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': {$migrationDefinition->parsingError}");
449
+            throw new \Exception("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': {$migrationDefinition->parsingError}");
450 450
         }
451 451
 
452 452
         // restore context
453 453
         $this->contextHandler->restoreCurrentContext($migration->name);
454 454
 
455 455
         if (!isset($this->migrationContext[$migration->name])) {
456
-            throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': the stored context is missing");
456
+            throw new \Exception("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': the stored context is missing");
457 457
         }
458 458
         $restoredContext = $this->migrationContext[$migration->name];
459
-        if (!is_array($restoredContext) || !isset($restoredContext['context']) || !isset($restoredContext['step'] )) {
460
-            throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': the stored context is invalid");
459
+        if (!is_array($restoredContext) || !isset($restoredContext['context']) || !isset($restoredContext['step'])) {
460
+            throw new \Exception("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': the stored context is invalid");
461 461
         }
462 462
 
463 463
         // update migration status
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
      * @param bool|null $forceSigchildEnabled
479 479
      * @return array
480 480
      */
481
-    protected function migrationContextFromParameters($defaultLanguageCode = null, $adminLogin = null, $forceSigchildEnabled = null )
481
+    protected function migrationContextFromParameters($defaultLanguageCode = null, $adminLogin = null, $forceSigchildEnabled = null)
482 482
     {
483 483
         $properties = array();
484 484
 
Please login to merge, or discard this patch.