1 | <?php |
||
14 | class SeedCommand extends Command |
||
15 | { |
||
16 | use ModuleCommandTrait; |
||
17 | |||
18 | /** |
||
19 | * The console command name. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $name = 'module:seed'; |
||
24 | |||
25 | /** |
||
26 | * The console command description. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $description = 'Run database seeder from the specified module or from all modules.'; |
||
31 | |||
32 | /** |
||
33 | * Execute the console command. |
||
34 | * |
||
35 | * @return mixed |
||
36 | */ |
||
37 | public function fire() |
||
52 | |||
53 | /** |
||
54 | * @throws RuntimeException |
||
55 | * |
||
56 | * @return Repository |
||
57 | */ |
||
58 | public function getModuleRepository() |
||
66 | |||
67 | /** |
||
68 | * @param $name |
||
69 | * |
||
70 | * @throws RuntimeException |
||
71 | * |
||
72 | * @return Module |
||
73 | */ |
||
74 | public function getModuleByName($name) |
||
83 | |||
84 | /** |
||
85 | * @param Module $module |
||
86 | * |
||
87 | * @return void |
||
88 | * |
||
89 | * @throws RuntimeException |
||
90 | */ |
||
91 | public function moduleSeed(Module $module) |
||
114 | |||
115 | /** |
||
116 | * Seed the specified module. |
||
117 | * |
||
118 | * @parama string $className |
||
119 | * |
||
120 | * @return array |
||
121 | */ |
||
122 | protected function dbSeed($className) |
||
138 | |||
139 | /** |
||
140 | * Get master database seeder name for the specified module. |
||
141 | * |
||
142 | * @param string $name |
||
143 | * |
||
144 | * @return string |
||
145 | */ |
||
146 | public function getSeederName($name) |
||
154 | |||
155 | /** |
||
156 | * Get the console command arguments. |
||
157 | * |
||
158 | * @return array |
||
159 | */ |
||
160 | 38 | protected function getArguments() |
|
166 | |||
167 | /** |
||
168 | * Get the console command options. |
||
169 | * |
||
170 | * @return array |
||
171 | */ |
||
172 | 38 | protected function getOptions() |
|
179 | } |
||
180 |
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.