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.
@@ 886-905 (lines=20) @@
883
     *
884
     * @return string[]
885
     */
886
    protected function getSeedFiles()
887
    {
888
        $config = $this->getConfig();
889
        $paths = $config->getSeedPaths();
890
        $files = [];
891
892
        foreach ($paths as $path) {
893
            $files = array_merge(
894
                $files,
895
                Util::glob($path . DIRECTORY_SEPARATOR . '*.php')
896
            );
897
        }
898
        // glob() can return the same file multiple times
899
        // This will cause the migration to fail with a
900
        // false assumption of duplicate migrations
901
        // http://php.net/manual/en/function.glob.php#110340
902
        $files = array_unique($files);
903
904
        return $files;
905
    }
906
907
    /**
908
     * Sets the config.