1 | <?php |
||
11 | class CommandMakeCommand extends GeneratorCommand |
||
12 | { |
||
13 | |||
14 | use ModuleCommandTrait; |
||
15 | |||
16 | /** |
||
17 | * The name of argument name. |
||
18 | * |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $argumentName = 'name'; |
||
22 | |||
23 | /** |
||
24 | * The console command name. |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $name = 'module:make-command'; |
||
29 | |||
30 | /** |
||
31 | * The console command description. |
||
32 | * |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $description = 'Generate new Artisan command for the specified module.'; |
||
36 | |||
37 | |||
38 | /** |
||
39 | * Get default namespace. |
||
40 | * |
||
41 | * @return string |
||
42 | */ |
||
43 | 3 | public function getDefaultNamespace() |
|
47 | |||
48 | |||
49 | /** |
||
50 | * Get the console command arguments. |
||
51 | * |
||
52 | * @return array |
||
53 | */ |
||
54 | 60 | protected function getArguments() |
|
61 | |||
62 | |||
63 | /** |
||
64 | * Get the console command options. |
||
65 | * |
||
66 | * @return array |
||
67 | */ |
||
68 | 60 | protected function getOptions() |
|
74 | |||
75 | |||
76 | /** |
||
77 | * @return mixed |
||
78 | */ |
||
79 | 3 | protected function getTemplateContents() |
|
89 | |||
90 | |||
91 | /** |
||
92 | * @return string |
||
93 | */ |
||
94 | 3 | private function getCommandName() |
|
98 | |||
99 | |||
100 | /** |
||
101 | * @return mixed |
||
102 | */ |
||
103 | 3 | protected function getDestinationFilePath() |
|
111 | |||
112 | |||
113 | /** |
||
114 | * @return string |
||
115 | */ |
||
116 | 3 | private function getFileName() |
|
120 | } |
||
121 |
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.