1 | <?php |
||
10 | class ComponentMakeCommand extends GeneratorCommand |
||
11 | { |
||
12 | /** |
||
13 | * The console command name. |
||
14 | * |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $name = 'make:component'; |
||
18 | |||
19 | /** |
||
20 | * The console command description. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $description = 'Create a new component class(ScoAdmin)'; |
||
25 | |||
26 | /** |
||
27 | * The type of class being generated. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $type = 'Component'; |
||
32 | |||
33 | /** |
||
34 | * Execute the console command. |
||
35 | * |
||
36 | * @return void |
||
37 | */ |
||
38 | public function handle() |
||
53 | |||
54 | /** |
||
55 | * Create a new permission observer for the component |
||
56 | */ |
||
57 | protected function createObserver() |
||
67 | |||
68 | protected function createModel() |
||
78 | |||
79 | /** |
||
80 | * Get the fully-qualified class name. |
||
81 | * |
||
82 | * @param string $class |
||
83 | * |
||
84 | * @return string |
||
85 | */ |
||
86 | protected function parseClass($class) |
||
100 | |||
101 | /** |
||
102 | * Get the stub file for the generator. |
||
103 | * |
||
104 | * @return string |
||
105 | */ |
||
106 | protected function getStub() |
||
110 | |||
111 | /** |
||
112 | * Build the class with the given name. |
||
113 | * |
||
114 | * @param string $name |
||
115 | * |
||
116 | * @return string |
||
117 | */ |
||
118 | protected function buildClass($name) |
||
128 | |||
129 | /** |
||
130 | * Get the default namespace for the class. |
||
131 | * |
||
132 | * @param string $rootNamespace |
||
133 | * |
||
134 | * @return string |
||
135 | */ |
||
136 | protected function getDefaultNamespace($rootNamespace) |
||
140 | |||
141 | /** |
||
142 | * Get the console command options. |
||
143 | * |
||
144 | * @return array |
||
145 | */ |
||
146 | protected function getOptions() |
||
164 | } |
||
165 |
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.