Code Duplication    Length = 20-20 lines in 2 locations

src/Phinx/Migration/Manager.php 2 locations

@@ 798-817 (lines=20) @@
795
     *
796
     * @return string[]
797
     */
798
    protected function getMigrationFiles()
799
    {
800
        $config = $this->getConfig();
801
        $paths = $config->getMigrationPaths();
802
        $files = [];
803
804
        foreach ($paths as $path) {
805
            $files = array_merge(
806
                $files,
807
                Util::glob($path . DIRECTORY_SEPARATOR . '*.php')
808
            );
809
        }
810
        // glob() can return the same file multiple times
811
        // This will cause the migration to fail with a
812
        // false assumption of duplicate migrations
813
        // http://php.net/manual/en/function.glob.php#110340
814
        $files = array_unique($files);
815
816
        return $files;
817
    }
818
819
    /**
820
     * Sets the database seeders.
@@ 945-964 (lines=20) @@
942
     *
943
     * @return string[]
944
     */
945
    protected function getSeedFiles()
946
    {
947
        $config = $this->getConfig();
948
        $paths = $config->getSeedPaths();
949
        $files = [];
950
951
        foreach ($paths as $path) {
952
            $files = array_merge(
953
                $files,
954
                Util::glob($path . DIRECTORY_SEPARATOR . '*.php')
955
            );
956
        }
957
        // glob() can return the same file multiple times
958
        // This will cause the migration to fail with a
959
        // false assumption of duplicate migrations
960
        // http://php.net/manual/en/function.glob.php#110340
961
        $files = array_unique($files);
962
963
        return $files;
964
    }
965
966
    /**
967
     * Sets the config.