Code Duplication    Length = 20-20 lines in 2 locations

src/Phinx/Migration/Manager.php 2 locations

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