Code Duplication    Length = 20-20 lines in 2 locations

src/Phinx/Migration/Manager.php 2 locations

@@ 738-757 (lines=20) @@
735
     *
736
     * @return string[]
737
     */
738
    protected function getMigrationFiles()
739
    {
740
        $config = $this->getConfig();
741
        $paths = $config->getMigrationPaths();
742
        $files = [];
743
744
        foreach ($paths as $path) {
745
            $files = array_merge(
746
                $files,
747
                Util::glob($path . DIRECTORY_SEPARATOR . '*.php')
748
            );
749
        }
750
        // glob() can return the same file multiple times
751
        // This will cause the migration to fail with a
752
        // false assumption of duplicate migrations
753
        // http://php.net/manual/en/function.glob.php#110340
754
        $files = array_unique($files);
755
756
        return $files;
757
    }
758
759
    /**
760
     * Sets the database seeders.
@@ 885-904 (lines=20) @@
882
     *
883
     * @return string[]
884
     */
885
    protected function getSeedFiles()
886
    {
887
        $config = $this->getConfig();
888
        $paths = $config->getSeedPaths();
889
        $files = [];
890
891
        foreach ($paths as $path) {
892
            $files = array_merge(
893
                $files,
894
                Util::glob($path . DIRECTORY_SEPARATOR . '*.php')
895
            );
896
        }
897
        // glob() can return the same file multiple times
898
        // This will cause the migration to fail with a
899
        // false assumption of duplicate migrations
900
        // http://php.net/manual/en/function.glob.php#110340
901
        $files = array_unique($files);
902
903
        return $files;
904
    }
905
906
    /**
907
     * Sets the config.