Code Duplication    Length = 20-20 lines in 2 locations

src/Phinx/Migration/Manager.php 2 locations

@@ 787-806 (lines=20) @@
784
     *
785
     * @return string[]
786
     */
787
    protected function getMigrationFiles()
788
    {
789
        $config = $this->getConfig();
790
        $paths = $config->getMigrationPaths();
791
        $files = [];
792
793
        foreach ($paths as $path) {
794
            $files = array_merge(
795
                $files,
796
                Util::glob($path . DIRECTORY_SEPARATOR . '*.php')
797
            );
798
        }
799
        // glob() can return the same file multiple times
800
        // This will cause the migration to fail with a
801
        // false assumption of duplicate migrations
802
        // http://php.net/manual/en/function.glob.php#110340
803
        $files = array_unique($files);
804
805
        return $files;
806
    }
807
808
    /**
809
     * Sets the database seeders.
@@ 934-953 (lines=20) @@
931
     *
932
     * @return string[]
933
     */
934
    protected function getSeedFiles()
935
    {
936
        $config = $this->getConfig();
937
        $paths = $config->getSeedPaths();
938
        $files = [];
939
940
        foreach ($paths as $path) {
941
            $files = array_merge(
942
                $files,
943
                Util::glob($path . DIRECTORY_SEPARATOR . '*.php')
944
            );
945
        }
946
        // glob() can return the same file multiple times
947
        // This will cause the migration to fail with a
948
        // false assumption of duplicate migrations
949
        // http://php.net/manual/en/function.glob.php#110340
950
        $files = array_unique($files);
951
952
        return $files;
953
    }
954
955
    /**
956
     * Sets the config.