Code Duplication    Length = 20-20 lines in 2 locations

src/Phinx/Migration/Manager.php 2 locations

@@ 737-756 (lines=20) @@
734
     *
735
     * @return string[]
736
     */
737
    protected function getMigrationFiles()
738
    {
739
        $config = $this->getConfig();
740
        $paths = $config->getMigrationPaths();
741
        $files = [];
742
743
        foreach ($paths as $path) {
744
            $files = array_merge(
745
                $files,
746
                Util::glob($path . DIRECTORY_SEPARATOR . '*.php')
747
            );
748
        }
749
        // glob() can return the same file multiple times
750
        // This will cause the migration to fail with a
751
        // false assumption of duplicate migrations
752
        // http://php.net/manual/en/function.glob.php#110340
753
        $files = array_unique($files);
754
755
        return $files;
756
    }
757
758
    /**
759
     * Sets the database seeders.
@@ 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.