Code Duplication    Length = 13-13 lines in 2 locations

Command/MassMigrateCommand.php 1 location

@@ 296-308 (lines=13) @@
293
294
        // if user wants to execute 'all' migrations: look for some which are registered in the database even if not
295
        // found by the loader
296
        if (empty($paths)) {
297
            foreach ($migrations as $migration) {
298
                if (in_array($migration->status, $allowedStatuses) && !isset($toExecute[$migration->name])) {
299
                    $migrationDefinitions = $migrationService->getMigrationsDefinitions(array($migration->path));
300
                    if (count($migrationDefinitions)) {
301
                        $migrationDefinition = reset($migrationDefinitions);
302
                        $toExecute[$migration->name] = $isChild ? $migrationService->parseMigrationDefinition($migrationDefinition) : $migrationDefinition;
303
                    } else {
304
                        // q: shall we raise a warning here ?
305
                    }
306
                }
307
            }
308
        }
309
310
        ksort($toExecute);
311

Command/MigrateCommand.php 1 location

@@ 273-285 (lines=13) @@
270
271
        // if user wants to execute 'all' migrations: look for some which are registered in the database even if not
272
        // found by the loader
273
        if (empty($paths)) {
274
            foreach ($migrations as $migration) {
275
                if (in_array($migration->status, $allowedStatuses) && !isset($toExecute[$migration->name])) {
276
                    $migrationDefinitions = $migrationService->getMigrationsDefinitions(array($migration->path));
277
                    if (count($migrationDefinitions)) {
278
                        $migrationDefinition = reset($migrationDefinitions);
279
                        $toExecute[$migration->name] = $migrationService->parseMigrationDefinition($migrationDefinition);
280
                    } else {
281
                        // q: shall we raise a warning here ?
282
                    }
283
                }
284
            }
285
        }
286
287
        ksort($toExecute);
288