Code Duplication    Length = 3-3 lines in 2 locations

Core/MigrationService.php 2 locations

@@ 256-258 (lines=3) @@
253
            $migrationDefinition = $this->parseMigrationDefinition($migrationDefinition);
254
        }
255
256
        if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) {
257
            throw new \Exception("Can not execute " . $this->getEntityName($migrationDefinition). " '{$migrationDefinition->name}': {$migrationDefinition->parsingError}");
258
        }
259
260
        /// @todo add support for setting in $migrationContext a userContentType ?
261
        $migrationContext = $this->migrationContextFromParameters($defaultLanguageCode, $adminLogin);
@@ 428-430 (lines=3) @@
425
        $migrationDefinition = reset($defs);
426
427
        $migrationDefinition = $this->parseMigrationDefinition($migrationDefinition);
428
        if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) {
429
            throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': {$migrationDefinition->parsingError}");
430
        }
431
432
        // restore context
433
        $this->contextHandler->restoreCurrentContext($migration->name);