1 | <?php namespace Wn\Generators\Commands; |
||
4 | class FactoryCommand extends BaseCommand { |
||
5 | |||
6 | protected $signature = 'wn:factory |
||
7 | {model : full qualified name of the model.} |
||
8 | {--fields= : the fields to generate.} |
||
9 | {--file= : the factories file.} |
||
10 | {--parsed : tells the command that arguments have been already parsed. To use when calling the command from an other command and passing the parsed arguments and options} |
||
11 | {--force= : override the existing files} |
||
12 | '; |
||
13 | |||
14 | protected $description = 'Generates a model factory'; |
||
15 | |||
16 | public function handle() |
||
33 | |||
34 | protected function getFile() |
||
42 | |||
43 | protected function getFieldsContent() |
||
64 | |||
65 | } |
||
66 |
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.