Total Complexity | 5 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | trait DatabaseTruncation |
||
10 | { |
||
11 | use IlluminateDatabaseTruncation; |
||
12 | |||
13 | /** |
||
14 | * The parameters that should be used when running "migrate:fresh". |
||
15 | * |
||
16 | * @return array |
||
17 | */ |
||
18 | 1 | protected function migrateFreshUsing() |
|
19 | { |
||
20 | 1 | $seeder = $this->seeder(); |
|
21 | |||
22 | 1 | $results = array_merge( |
|
23 | 1 | [ |
|
24 | 1 | '--drop-views' => $this->shouldDropViews(), |
|
25 | 1 | '--drop-types' => $this->shouldDropTypes(), |
|
26 | 1 | ], |
|
27 | 1 | $seeder ? ['--seeder' => $seeder] : ['--seed' => $this->shouldSeed()], |
|
28 | 1 | $this->setMigrationPaths(), |
|
29 | 1 | ); |
|
30 | |||
31 | 1 | return $results; |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * Determine if types should be dropped when refreshing the database. |
||
36 | * |
||
37 | * @return array<string, array<string>|string> |
||
38 | */ |
||
39 | 1 | protected function setMigrationPaths() |
|
52 | } |
||
53 | } |
||
54 |