Code Duplication    Length = 20-20 lines in 2 locations

src/Phinx/Migration/Manager.php 2 locations

@@ 766-785 (lines=20) @@
763
     *
764
     * @return string[]
765
     */
766
    protected function getMigrationFiles()
767
    {
768
        $config = $this->getConfig();
769
        $paths = $config->getMigrationPaths();
770
        $files = [];
771
772
        foreach ($paths as $path) {
773
            $files = array_merge(
774
                $files,
775
                Util::glob($path . DIRECTORY_SEPARATOR . '*.php')
776
            );
777
        }
778
        // glob() can return the same file multiple times
779
        // This will cause the migration to fail with a
780
        // false assumption of duplicate migrations
781
        // http://php.net/manual/en/function.glob.php#110340
782
        $files = array_unique($files);
783
784
        return $files;
785
    }
786
787
    /**
788
     * Sets the database seeders.
@@ 912-931 (lines=20) @@
909
     *
910
     * @return string[]
911
     */
912
    protected function getSeedFiles()
913
    {
914
        $config = $this->getConfig();
915
        $paths = $config->getSeedPaths();
916
        $files = [];
917
918
        foreach ($paths as $path) {
919
            $files = array_merge(
920
                $files,
921
                Util::glob($path . DIRECTORY_SEPARATOR . '*.php')
922
            );
923
        }
924
        // glob() can return the same file multiple times
925
        // This will cause the migration to fail with a
926
        // false assumption of duplicate migrations
927
        // http://php.net/manual/en/function.glob.php#110340
928
        $files = array_unique($files);
929
930
        return $files;
931
    }
932
933
    /**
934
     * Sets the config.