Code Duplication    Length = 20-20 lines in 2 locations

src/Phinx/Migration/Manager.php 2 locations

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