Code Duplication    Length = 3-3 lines in 2 locations

Core/MigrationService.php 2 locations

@@ 261-263 (lines=3) @@
258
            $migrationDefinition = $this->parseMigrationDefinition($migrationDefinition);
259
        }
260
261
        if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) {
262
            throw new \Exception("Can not execute " . $this->getEntityName($migrationDefinition). " '{$migrationDefinition->name}': {$migrationDefinition->parsingError}");
263
        }
264
265
        /// @todo add support for setting in $migrationContext a userContentType ?
266
        $migrationContext = $this->migrationContextFromParameters($defaultLanguageCode, $adminLogin);
@@ 433-435 (lines=3) @@
430
        $migrationDefinition = reset($defs);
431
432
        $migrationDefinition = $this->parseMigrationDefinition($migrationDefinition);
433
        if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) {
434
            throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': {$migrationDefinition->parsingError}");
435
        }
436
437
        // restore context
438
        $this->contextHandler->restoreCurrentContext($migration->name);