1 | <?php |
||
11 | class ModelCommand extends GeneratorCommand |
||
12 | { |
||
13 | use ModuleCommandTrait; |
||
14 | |||
15 | /** |
||
16 | * The name of argument name. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $argumentName = 'model'; |
||
21 | |||
22 | /** |
||
23 | * The console command name. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $name = 'module:make-model'; |
||
28 | |||
29 | /** |
||
30 | * The console command description. |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $description = 'Generate new model for the specified module.'; |
||
35 | |||
36 | /** |
||
37 | * Get the console command arguments. |
||
38 | * |
||
39 | * @return array |
||
40 | */ |
||
41 | 16 | protected function getArguments() |
|
48 | |||
49 | /** |
||
50 | * Get the console command options. |
||
51 | * |
||
52 | * @return array |
||
53 | */ |
||
54 | 16 | protected function getOptions() |
|
60 | |||
61 | /** |
||
62 | * @return mixed |
||
63 | */ |
||
64 | 3 | protected function getTemplateContents() |
|
79 | |||
80 | /** |
||
81 | * @return mixed |
||
82 | */ |
||
83 | 3 | protected function getDestinationFilePath() |
|
91 | |||
92 | /** |
||
93 | * @return mixed|string |
||
94 | */ |
||
95 | 3 | private function getModelName() |
|
99 | |||
100 | /** |
||
101 | * @return string |
||
102 | */ |
||
103 | 3 | private function getFillable() |
|
115 | |||
116 | /** |
||
117 | * Get default namespace. |
||
118 | * |
||
119 | * @return string |
||
120 | */ |
||
121 | 3 | public function getDefaultNamespace() |
|
125 | } |
||
126 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.