Code Duplication    Length = 13-13 lines in 2 locations

Command/MassMigrateCommand.php 1 location

@@ 361-373 (lines=13) @@
358
359
        // if user wants to execute 'all' migrations: look for some which are registered in the database even if not
360
        // found by the loader
361
        if (empty($paths)) {
362
            foreach ($migrations as $migration) {
363
                if ($migration->status == Migration::STATUS_TODO && !isset($toExecute[$migration->name])) {
364
                    $migrationDefinitions = $migrationService->getMigrationsDefinitions(array($migration->path));
365
                    if (count($migrationDefinitions)) {
366
                        $migrationDefinition = reset($migrationDefinitions);
367
                        $toExecute[$migration->name] = $isChild ? $migrationService->parseMigrationDefinition($migrationDefinition) : $migrationDefinition;
368
                    } else {
369
                        // q: shall we raise a warning here ?
370
                    }
371
                }
372
            }
373
        }
374
375
        ksort($toExecute);
376

Command/MigrateCommand.php 1 location

@@ 264-276 (lines=13) @@
261
262
        // if user wants to execute 'all' migrations: look for some which are registered in the database even if not
263
        // found by the loader
264
        if (empty($paths)) {
265
            foreach ($migrations as $migration) {
266
                if ($migration->status == Migration::STATUS_TODO && !isset($toExecute[$migration->name])) {
267
                    $migrationDefinitions = $migrationService->getMigrationsDefinitions(array($migration->path));
268
                    if (count($migrationDefinitions)) {
269
                        $migrationDefinition = reset($migrationDefinitions);
270
                        $toExecute[$migration->name] = $migrationService->parseMigrationDefinition($migrationDefinition);
271
                    } else {
272
                        // q: shall we raise a warning here ?
273
                    }
274
                }
275
            }
276
        }
277
278
        ksort($toExecute);
279