Code Duplication    Length = 7-9 lines in 2 locations

src/Phinx/Migration/Manager.php 2 locations

@@ 330-338 (lines=9) @@
327
328
        if ($version === null) {
329
            $version = max(array_merge($versions, array_keys($migrations)));
330
        } else {
331
            if (0 != $version && !isset($migrations[$version])) {
332
                $this->output->writeln(sprintf(
333
                    '<comment>warning</comment> %s is not a valid version',
334
                    $version
335
                ));
336
337
                return;
338
            }
339
        }
340
341
        // are we migrating up or down?
@@ 1015-1021 (lines=7) @@
1012
            $version = $lastVersion['version'];
1013
        }
1014
1015
        if (0 != $version && !isset($migrations[$version])) {
1016
            $this->output->writeln(sprintf(
1017
                '<comment>warning</comment> %s is not a valid version',
1018
                $version
1019
            ));
1020
1021
            return;
1022
        }
1023
1024
        switch ($mark) {