Code Duplication    Length = 3-3 lines in 2 locations

Command/MassMigrateCommand.php 1 location

@@ 313-315 (lines=3) @@
310
        // filter away all migrations except 'to do' ones
311
        $toExecute = array();
312
        foreach($migrationDefinitions as $name => $migrationDefinition) {
313
            if (!isset($migrations[$name]) || (($migration = $migrations[$name]) && $migration->status == Migration::STATUS_TODO)) {
314
                $toExecute[$name] = $isChild ? $migrationService->parseMigrationDefinition($migrationDefinition) : $migrationDefinition;
315
            }
316
            // save the list of non-executable migrations as well
317
            if (!$isChild && isset($migrations[$name]) && (($migration = $migrations[$name]) && $migration->status != Migration::STATUS_TODO)) {
318
                $this->migrationsAlreadyDone[$migration->status]++;

Command/MigrateCommand.php 1 location

@@ 249-251 (lines=3) @@
246
        // filter away all migrations except 'to do' ones
247
        $toExecute = array();
248
        foreach ($migrationDefinitions as $name => $migrationDefinition) {
249
            if (!isset($migrations[$name]) || (($migration = $migrations[$name]) && in_array($migration->status, $allowedStatuses))) {
250
                $toExecute[$name] = $migrationService->parseMigrationDefinition($migrationDefinition);
251
            }
252
        }
253
254
        // if user wants to execute 'all' migrations: look for some which are registered in the database even if not