@@ 774-793 (lines=20) @@ | ||
771 | * |
|
772 | * @return string[] |
|
773 | */ |
|
774 | protected function getMigrationFiles() |
|
775 | { |
|
776 | $config = $this->getConfig(); |
|
777 | $paths = $config->getMigrationPaths(); |
|
778 | $files = []; |
|
779 | ||
780 | foreach ($paths as $path) { |
|
781 | $files = array_merge( |
|
782 | $files, |
|
783 | Util::glob($path . DIRECTORY_SEPARATOR . '*.php') |
|
784 | ); |
|
785 | } |
|
786 | // glob() can return the same file multiple times |
|
787 | // This will cause the migration to fail with a |
|
788 | // false assumption of duplicate migrations |
|
789 | // http://php.net/manual/en/function.glob.php#110340 |
|
790 | $files = array_unique($files); |
|
791 | ||
792 | return $files; |
|
793 | } |
|
794 | ||
795 | /** |
|
796 | * Sets the database seeders. |
|
@@ 921-940 (lines=20) @@ | ||
918 | * |
|
919 | * @return string[] |
|
920 | */ |
|
921 | protected function getSeedFiles() |
|
922 | { |
|
923 | $config = $this->getConfig(); |
|
924 | $paths = $config->getSeedPaths(); |
|
925 | $files = []; |
|
926 | ||
927 | foreach ($paths as $path) { |
|
928 | $files = array_merge( |
|
929 | $files, |
|
930 | Util::glob($path . DIRECTORY_SEPARATOR . '*.php') |
|
931 | ); |
|
932 | } |
|
933 | // glob() can return the same file multiple times |
|
934 | // This will cause the migration to fail with a |
|
935 | // false assumption of duplicate migrations |
|
936 | // http://php.net/manual/en/function.glob.php#110340 |
|
937 | $files = array_unique($files); |
|
938 | ||
939 | return $files; |
|
940 | } |
|
941 | ||
942 | /** |
|
943 | * Sets the config. |