Code Duplication    Length = 3-3 lines in 2 locations

Command/MassMigrateCommand.php 1 location

@@ 285-287 (lines=3) @@
282
        // filter away all migrations except 'to do' ones
283
        $toExecute = array();
284
        foreach($migrationDefinitions as $name => $migrationDefinition) {
285
            if (!isset($migrations[$name]) || (($migration = $migrations[$name]) && in_array($migration->status, $allowedStatuses))) {
286
                $toExecute[$name] = $isChild ? $migrationService->parseMigrationDefinition($migrationDefinition) : $migrationDefinition;
287
            }
288
            // save the list of non-executable migrations as well (even when using 'force')
289
            if (!$isChild && isset($migrations[$name]) && (($migration = $migrations[$name]) && $migration->status != Migration::STATUS_TODO)) {
290
                $this->migrationsAlreadyDone[$migration->status]++;

Command/MigrateCommand.php 1 location

@@ 266-268 (lines=3) @@
263
        // filter away all migrations except 'to do' ones
264
        $toExecute = array();
265
        foreach ($migrationDefinitions as $name => $migrationDefinition) {
266
            if (!isset($migrations[$name]) || (($migration = $migrations[$name]) && in_array($migration->status, $allowedStatuses))) {
267
                $toExecute[$name] = $migrationService->parseMigrationDefinition($migrationDefinition);
268
            }
269
        }
270
271
        // if user wants to execute 'all' migrations: look for some which are registered in the database even if not