1 | <?php |
||
9 | class MigrateCommand extends Command |
||
10 | { |
||
11 | /** |
||
12 | * The console command name. |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $name = 'module:migrate'; |
||
17 | |||
18 | /** |
||
19 | * The console command description. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $description = 'Migrate the migrations from the specified module or from all modules.'; |
||
24 | |||
25 | /** |
||
26 | * @var \Nwidart\Modules\Repository |
||
27 | */ |
||
28 | protected $module; |
||
29 | |||
30 | /** |
||
31 | * Execute the console command. |
||
32 | * |
||
33 | * @return mixed |
||
34 | */ |
||
35 | public function fire() |
||
51 | |||
52 | /** |
||
53 | * Run the migration from the specified module. |
||
54 | * |
||
55 | * @param string $name |
||
56 | * |
||
57 | * @return mixed |
||
58 | */ |
||
59 | protected function migrate($name) |
||
74 | |||
75 | /** |
||
76 | * Get migration path for specific module. |
||
77 | * |
||
78 | * @param \Nwidart\Modules\Module $module |
||
79 | * @return string |
||
80 | */ |
||
81 | protected function getPath($module) |
||
87 | |||
88 | /** |
||
89 | * Get the console command arguments. |
||
90 | * |
||
91 | * @return array |
||
92 | */ |
||
93 | 3 | protected function getArguments() |
|
99 | |||
100 | /** |
||
101 | * Get the console command options. |
||
102 | * |
||
103 | * @return array |
||
104 | */ |
||
105 | 3 | protected function getOptions() |
|
115 | } |
||
116 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.