1 | <?php |
||
9 | abstract class GeneratorCommand extends Command |
||
10 | { |
||
11 | /** |
||
12 | * The name of 'name' argument. |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $argumentName = ''; |
||
17 | |||
18 | /** |
||
19 | * Get template contents. |
||
20 | * |
||
21 | * @return string |
||
22 | */ |
||
23 | abstract protected function getTemplateContents(); |
||
24 | |||
25 | /** |
||
26 | * Get the destination file path. |
||
27 | * |
||
28 | * @return string |
||
29 | */ |
||
30 | abstract protected function getDestinationFilePath(); |
||
31 | |||
32 | /** |
||
33 | * Execute the console command. |
||
34 | */ |
||
35 | 16 | public function fire() |
|
53 | |||
54 | /** |
||
55 | * Get class name. |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | 16 | public function getClass() |
|
63 | |||
64 | /** |
||
65 | * Get default namespace. |
||
66 | * |
||
67 | * @return string |
||
68 | */ |
||
69 | 6 | public function getDefaultNamespace() |
|
73 | |||
74 | /** |
||
75 | * Get class namespace. |
||
76 | * |
||
77 | * @param \Nwidart\Module\Module $module |
||
78 | * |
||
79 | * @return string |
||
80 | */ |
||
81 | 16 | public function getClassNamespace($module) |
|
97 | } |
||
98 |
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.