Code Duplication    Length = 11-13 lines in 3 locations

src/Phinx/Migration/Manager.php 3 locations

@@ 684-694 (lines=11) @@
681
        if ($this->migrations === null) {
682
            $phpFiles = $this->getMigrationFiles();
683
684
            if ($this->getOutput()->getVerbosity() >= OutputInterface::VERBOSITY_DEBUG) {
685
                $this->getOutput()->writeln('Migration file');
686
                $this->getOutput()->writeln(
687
                    array_map(
688
                        function ($phpFile) {
689
                            return '    ' . $phpFile;
690
                        },
691
                        $phpFiles
692
                    )
693
                );
694
            }
695
696
            // filter the files to only get the ones that match our naming scheme
697
            $fileNames = [];
@@ 703-713 (lines=11) @@
700
701
            foreach ($phpFiles as $filePath) {
702
                if (Util::isValidMigrationFileName(basename($filePath))) {
703
                    if ($this->getOutput()->getVerbosity() >= OutputInterface::VERBOSITY_DEBUG) {
704
                        $this->getOutput()->writeln('Valid migration file');
705
                        $this->getOutput()->writeln(
706
                            array_map(
707
                                function ($phpFile) {
708
                                    return '    ' . $phpFile;
709
                                },
710
                                $phpFiles
711
                            )
712
                        );
713
                    }
714
715
                    $version = Util::getVersionFromFileName(basename($filePath));
716
@@ 771-783 (lines=13) @@
768
                    }
769
770
                    $versions[$version] = $migration;
771
                } else {
772
                    if ($this->getOutput()->getVerbosity() >= OutputInterface::VERBOSITY_DEBUG) {
773
                        $this->getOutput()->writeln('Invalid migration file');
774
                        $this->getOutput()->writeln(
775
                            array_map(
776
                                function ($phpFile) {
777
                                    return '  ' . $phpFile;
778
                                },
779
                                $phpFiles
780
                            )
781
                        );
782
                    }
783
                }
784
            }
785
786
            ksort($versions);