1 | <?php |
||
10 | class ControllerMakeCommand extends GeneratorCommand |
||
11 | { |
||
12 | use ModuleCommandTrait; |
||
13 | |||
14 | /** |
||
15 | * The name of argument being used. |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $argumentName = 'controller'; |
||
20 | |||
21 | /** |
||
22 | * The console command name. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $name = 'module:make-controller'; |
||
27 | |||
28 | /** |
||
29 | * The console command description. |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $description = 'Generate new restful controller for the specified module.'; |
||
34 | |||
35 | /** |
||
36 | * Get controller name. |
||
37 | * |
||
38 | * @return string |
||
39 | */ |
||
40 | 54 | public function getDestinationFilePath() |
|
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | 54 | protected function getTemplateContents() |
|
69 | |||
70 | /** |
||
71 | * Get the console command arguments. |
||
72 | * |
||
73 | * @return array |
||
74 | */ |
||
75 | 60 | protected function getArguments() |
|
82 | |||
83 | /** |
||
84 | * @return array |
||
85 | */ |
||
86 | 60 | protected function getOptions() |
|
92 | |||
93 | /** |
||
94 | * @return array|string |
||
95 | */ |
||
96 | 54 | protected function getControllerName() |
|
106 | |||
107 | /** |
||
108 | * Get default namespace. |
||
109 | * |
||
110 | * @return string |
||
111 | */ |
||
112 | 54 | public function getDefaultNamespace() |
|
116 | |||
117 | /** |
||
118 | * Get the stub file name based on the plain option |
||
119 | * @return string |
||
120 | */ |
||
121 | 54 | private function getStubName() |
|
129 | } |
||
130 |
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.