| Conditions | 1 |
| Paths | 1 |
| Total Lines | 30 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function getMigrationFiles($paths): array |
||
| 34 | { |
||
| 35 | return collect($paths) |
||
| 36 | ->flatMap( |
||
| 37 | function ($path) { |
||
| 38 | return collect( |
||
| 39 | (new Finder)->in([$path]) |
||
| 40 | ->files() |
||
| 41 | ) |
||
| 42 | ->map( |
||
| 43 | function (SplFileInfo $file) { |
||
| 44 | return $file->getPathname(); |
||
| 45 | } |
||
| 46 | ) |
||
| 47 | ->all(); |
||
| 48 | } |
||
| 49 | ) |
||
| 50 | ->filter() |
||
| 51 | ->sortBy( |
||
| 52 | function ($file) { |
||
| 53 | return $this->getMigrationName($file); |
||
| 54 | } |
||
| 55 | ) |
||
| 56 | ->values() |
||
| 57 | ->keyBy( |
||
| 58 | function ($file) { |
||
| 59 | return $this->getMigrationName($file); |
||
| 60 | } |
||
| 61 | ) |
||
| 62 | ->all(); |
||
| 63 | } |
||
| 65 |