| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public static function migrationDirs() |
||
| 17 | { |
||
| 18 | // normalize the migration paths |
||
| 19 | $migrationDirs = []; |
||
| 20 | |||
| 21 | foreach (app('migrator')->paths() as $path) { |
||
| 22 | // Excludes the migrations within "vendor" folder: |
||
| 23 | if (! Str::startsWith($path, [base_path('vendor')])) { |
||
| 24 | $migrationDirs[] = FilePath::normalize($path); |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 | $migrationDirs[] = app()->databasePath().DIRECTORY_SEPARATOR.'migrations'; |
||
| 29 | |||
| 30 | return $migrationDirs; |
||
| 31 | } |
||
| 32 | |||
| 55 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.