1 | <?php |
||
9 | class ControllerCommand extends GeneratorCommand |
||
10 | { |
||
11 | use ModuleCommandTrait; |
||
12 | |||
13 | /** |
||
14 | * The name of argument being used. |
||
15 | * |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $argumentName = 'controller'; |
||
19 | |||
20 | /** |
||
21 | * The console command name. |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $name = 'module:make-controller'; |
||
26 | |||
27 | /** |
||
28 | * The console command description. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $description = 'Generate new restful controller for the specified module.'; |
||
33 | |||
34 | /** |
||
35 | * Get controller name. |
||
36 | * |
||
37 | * @return string |
||
38 | */ |
||
39 | 16 | public function getDestinationFilePath() |
|
47 | |||
48 | /** |
||
49 | * @return Stub |
||
50 | */ |
||
51 | 16 | protected function getTemplateContents() |
|
68 | |||
69 | /** |
||
70 | * Get the console command arguments. |
||
71 | * |
||
72 | * @return array |
||
73 | */ |
||
74 | 16 | protected function getArguments() |
|
81 | |||
82 | /** |
||
83 | * @return array|string |
||
84 | */ |
||
85 | 16 | protected function getControllerName() |
|
95 | |||
96 | /** |
||
97 | * Get default namespace. |
||
98 | * |
||
99 | * @return string |
||
100 | */ |
||
101 | 16 | public function getDefaultNamespace() |
|
105 | } |
||
106 |
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.