1 | <?php |
||
11 | class MakeCommandCommand extends Command |
||
12 | { |
||
13 | use ComponentCommandTrait; |
||
14 | |||
15 | /** |
||
16 | * The name of argument name. |
||
17 | * |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $argumentName = 'name'; |
||
21 | |||
22 | /** |
||
23 | * The console command name. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $name = 'component:make-command'; |
||
28 | |||
29 | /** |
||
30 | * The console command description. |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $description = 'Generate new Artisan command for the specified component.'; |
||
35 | |||
36 | /** |
||
37 | * Get the console command arguments. |
||
38 | * |
||
39 | * @return array |
||
40 | */ |
||
41 | protected function getArguments() |
||
48 | |||
49 | /** |
||
50 | * Get the console command options. |
||
51 | * |
||
52 | * @return array |
||
53 | */ |
||
54 | protected function getOptions() |
||
60 | |||
61 | /** |
||
62 | * @return mixed |
||
63 | */ |
||
64 | protected function getTemplateContents() |
||
74 | |||
75 | /** |
||
76 | * @return mixed |
||
77 | */ |
||
78 | protected function getDestinationFilePath() |
||
86 | |||
87 | /** |
||
88 | * @return string |
||
89 | */ |
||
90 | private function getFileName() |
||
94 | |||
95 | /** |
||
96 | * @return string |
||
97 | */ |
||
98 | private function getCommandName() |
||
102 | |||
103 | /** |
||
104 | * Get default namespace. |
||
105 | * |
||
106 | * @return string |
||
107 | */ |
||
108 | public function getDefaultNamespace() |
||
112 | } |
||
113 |
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.