1 | <?php |
||
12 | class GenerateListenerCommand extends GeneratorCommand |
||
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 = 'Generate a new Listener Class for the specified module'; |
||
31 | |||
32 | /** |
||
33 | * Get the console command arguments. |
||
34 | * |
||
35 | * @return array |
||
36 | */ |
||
37 | 25 | protected function getArguments() |
|
44 | |||
45 | /** |
||
46 | * Get the console command options. |
||
47 | * |
||
48 | * @return array |
||
49 | */ |
||
50 | 25 | protected function getOptions() |
|
56 | |||
57 | 2 | protected function getTemplateContents() |
|
70 | |||
71 | 2 | protected function getDestinationFilePath() |
|
80 | |||
81 | /** |
||
82 | * @return string |
||
83 | */ |
||
84 | 2 | protected function getFileName() |
|
88 | |||
89 | 2 | public function fire() |
|
97 | |||
98 | 2 | protected function getEventName(Module $module) |
|
102 | } |
||
103 |
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.