1 | <?php |
||
9 | class MakeCommand extends CommandGenerator |
||
10 | { |
||
11 | /** |
||
12 | * Module folders to be created. |
||
13 | * |
||
14 | * @var array |
||
15 | */ |
||
16 | protected $listFolders = []; |
||
17 | |||
18 | /** |
||
19 | * Module files to be created. |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | protected $listFiles = []; |
||
24 | |||
25 | /** |
||
26 | * Module signature option. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $signOption = []; |
||
31 | |||
32 | /** |
||
33 | * Module stubs used to populate defined files. |
||
34 | * |
||
35 | * @var array |
||
36 | */ |
||
37 | protected $listStubs = []; |
||
38 | |||
39 | /** |
||
40 | * The modules instance. |
||
41 | * |
||
42 | * @var Modules |
||
43 | */ |
||
44 | protected $module; |
||
45 | |||
46 | /** |
||
47 | * The modules path. |
||
48 | * |
||
49 | * @var string |
||
50 | */ |
||
51 | protected $modulePath; |
||
52 | |||
53 | /** |
||
54 | * The modules info. |
||
55 | * |
||
56 | * @var Illuminate\Support\Collection; |
||
57 | */ |
||
58 | protected $moduleInfo; |
||
59 | |||
60 | /** |
||
61 | * The filesystem instance. |
||
62 | * |
||
63 | * @var Filesystem |
||
64 | */ |
||
65 | protected $files; |
||
66 | |||
67 | /** |
||
68 | * Array to store the configuration details. |
||
69 | * |
||
70 | * @var array |
||
71 | */ |
||
72 | protected $container; |
||
73 | |||
74 | /** |
||
75 | * String to store the command type. |
||
76 | * |
||
77 | * @var string |
||
78 | */ |
||
79 | protected $type; |
||
80 | |||
81 | /** |
||
82 | * Create a new command instance. |
||
83 | * |
||
84 | * @param Filesystem $files |
||
85 | * @param Modules $module |
||
86 | */ |
||
87 | public function __construct(Filesystem $files, Modules $module) |
||
94 | |||
95 | /** |
||
96 | * Execute the console command. |
||
97 | * |
||
98 | * @return mixed |
||
99 | */ |
||
100 | public function fire() |
||
117 | |||
118 | /** |
||
119 | * generate the console command. |
||
120 | * |
||
121 | * @return mixed |
||
122 | */ |
||
123 | protected function generate() |
||
163 | |||
164 | /** |
||
165 | * Resolve Container after getting file path |
||
166 | * |
||
167 | * @param string $FilePath |
||
|
|||
168 | * @return Array |
||
169 | */ |
||
170 | protected function resolveByPath($filePath){} |
||
171 | |||
172 | /** |
||
173 | * Resolve Container after getting input option |
||
174 | * |
||
175 | * @param string $option |
||
176 | * @return Array |
||
177 | */ |
||
178 | protected function resolveByOption($option){} |
||
179 | |||
180 | /** |
||
181 | * Parse Slug Name Of The Module |
||
182 | * |
||
183 | * @param string $slug |
||
184 | * @return string |
||
185 | */ |
||
186 | protected function parseSlug($slug) |
||
202 | |||
203 | /** |
||
204 | * Parse Class Name Of The Module |
||
205 | * |
||
206 | * @param string $slug |
||
207 | * @return string |
||
208 | */ |
||
209 | protected function parseName($name) |
||
231 | |||
232 | /** |
||
233 | * Make FilePath |
||
234 | * |
||
235 | * @param string $folder |
||
236 | * @param string $name |
||
237 | * @return string |
||
238 | */ |
||
239 | protected function makeFilePath($folder, $name) |
||
252 | |||
253 | /** |
||
254 | * Make FileName |
||
255 | * |
||
256 | * @param string $filePath |
||
257 | * @return string |
||
258 | */ |
||
259 | protected function makeFileName($filePath) |
||
263 | |||
264 | /** |
||
265 | * Build the directory for the class if necessary. |
||
266 | * |
||
267 | * @param string $path |
||
268 | * @return string |
||
269 | */ |
||
270 | protected function makeDirectory($path) |
||
276 | |||
277 | /** |
||
278 | * Get Namespace of the current file |
||
279 | * |
||
280 | * @param string $file |
||
281 | * @return string |
||
282 | */ |
||
283 | protected function getNamespace($file) |
||
292 | |||
293 | /** |
||
294 | * Get stub content by key. |
||
295 | * |
||
296 | * @param int $key |
||
297 | * @return string |
||
298 | */ |
||
299 | protected function getStubContent($stubName) |
||
305 | |||
306 | /** |
||
307 | * Replace placeholder text with correct values. |
||
308 | * |
||
309 | * @return string |
||
310 | */ |
||
311 | protected function formatContent($content){} |
||
312 | } |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.