1 | <?php |
||
14 | class SeedCommand extends ComponentCommand |
||
15 | { |
||
16 | use ComponentCommandTrait; |
||
17 | |||
18 | /** |
||
19 | * The console command name. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $name = 'component:seed'; |
||
24 | |||
25 | /** |
||
26 | * The console command description. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $description = 'Run database seeder from the specified component or from all components.'; |
||
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 getComponentRepository() |
||
67 | |||
68 | /** |
||
69 | * @param $name |
||
70 | * |
||
71 | * @throws RuntimeException |
||
72 | * |
||
73 | * @return Component |
||
74 | */ |
||
75 | public function getComponentByName($name) |
||
84 | |||
85 | /** |
||
86 | * @param Component $component |
||
87 | * |
||
88 | * @return void |
||
89 | */ |
||
90 | public function componentSeed(Component $component) |
||
113 | |||
114 | /** |
||
115 | * Seed the specified component. |
||
116 | * |
||
117 | * @param string $className |
||
118 | * |
||
119 | * @return array |
||
120 | */ |
||
121 | protected function dbSeed($className) |
||
137 | |||
138 | /** |
||
139 | * Get master database seeder name for the specified component. |
||
140 | * |
||
141 | * @param string $name |
||
142 | * |
||
143 | * @return string |
||
144 | */ |
||
145 | public function getSeederName($name) |
||
153 | |||
154 | /** |
||
155 | * Get the console command arguments. |
||
156 | * |
||
157 | * @return array |
||
158 | */ |
||
159 | protected function getArguments() |
||
165 | |||
166 | /** |
||
167 | * Get the console command options. |
||
168 | * |
||
169 | * @return array |
||
170 | */ |
||
171 | protected function getOptions() |
||
178 | } |
||
179 |
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.