Total Complexity | 9 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
7 | trait CanConfigureMigrationCommands |
||
8 | { |
||
9 | /** |
||
10 | * Determine if types should be dropped when refreshing the database. |
||
11 | * |
||
12 | * @return array<string, array<string>|string> |
||
13 | */ |
||
14 | 29 | protected function setMigrationPaths() |
|
15 | { |
||
16 | 29 | $migrationSettings = []; |
|
17 | |||
18 | 29 | if (property_exists($this, 'realPath')) { |
|
19 | 29 | $migrationSettings['--realpath'] = $this->realPath ?? false; |
|
20 | } |
||
21 | |||
22 | 29 | if (property_exists($this, 'migrationPaths')) { |
|
23 | 29 | $migrationSettings['--path'] = $this->migrationPaths; |
|
24 | } |
||
25 | |||
26 | 29 | return $migrationSettings; |
|
27 | } |
||
28 | |||
29 | /** |
||
30 | * Determine if custom analyzers should be dropped when refreshing the database. |
||
31 | * |
||
32 | * @return bool |
||
33 | */ |
||
34 | 30 | protected function shouldDropAnalyzers() |
|
37 | } |
||
38 | |||
39 | /** |
||
40 | * Determine if graphs should be dropped when refreshing the database. |
||
41 | * |
||
42 | * @return bool |
||
43 | */ |
||
44 | 30 | protected function shouldDropGraphs() |
|
45 | { |
||
46 | 30 | return property_exists($this, 'dropGraphs') ? $this->dropGraphs : false; |
|
47 | } |
||
48 | |||
49 | |||
50 | /** |
||
51 | * Determine if all analyzers, graphs and views should be dropped when refreshing the database. |
||
52 | * |
||
53 | * @return bool |
||
54 | */ |
||
55 | 30 | protected function shouldDropAll() |
|
58 | } |
||
59 | } |
||
60 |