1 | <?php |
||
11 | class ListenerMakeCommand extends GeneratorCommand |
||
12 | { |
||
13 | |||
14 | use ModuleCommandTrait; |
||
15 | |||
16 | protected $argumentName = 'name'; |
||
17 | |||
18 | /** |
||
19 | * The console command name. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $name = 'module:make-listener'; |
||
24 | |||
25 | /** |
||
26 | * The console command description. |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $description = 'Create a new event listener class for the specified module'; |
||
31 | |||
32 | |||
33 | 2 | public function handle() |
|
43 | |||
44 | |||
45 | /** |
||
46 | * Get the console command arguments. |
||
47 | * |
||
48 | * @return array |
||
49 | */ |
||
50 | 60 | protected function getArguments() |
|
57 | |||
58 | |||
59 | /** |
||
60 | * Get the console command options. |
||
61 | * |
||
62 | * @return array |
||
63 | */ |
||
64 | 60 | protected function getOptions() |
|
70 | |||
71 | |||
72 | 2 | protected function getTemplateContents() |
|
82 | |||
83 | |||
84 | 2 | private function getNamespace($module) |
|
90 | |||
91 | |||
92 | 2 | protected function getEventName(Module $module) |
|
96 | |||
97 | |||
98 | 2 | protected function getDestinationFilePath() |
|
106 | |||
107 | |||
108 | /** |
||
109 | * @return string |
||
110 | */ |
||
111 | 2 | protected function getFileName() |
|
115 | } |
||
116 |
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.