1 | <?php |
||
17 | class AddonMakeCommand extends Command |
||
18 | { |
||
19 | use MakeCommandTrait; |
||
20 | |||
21 | /** |
||
22 | * The console command signature. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $signature = 'make:addon |
||
27 | {name : The name of the addon.} |
||
28 | {skeleton? : Skeleton of addon.} |
||
29 | {--namespace= : PHP namespace of addon. Slash OK.} |
||
30 | {--no-namespace : No PHP namespace.} |
||
31 | {--language= : Languages, comma separated.} |
||
32 | '; |
||
33 | |||
34 | /** |
||
35 | * The console command description. |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $description = 'Create a new addon directory'; |
||
40 | |||
41 | /** |
||
42 | * @var array |
||
43 | */ |
||
44 | protected $skeletons = [ |
||
45 | 1 => 'minimum', |
||
46 | 2 => 'simple', |
||
47 | 3 => 'library', |
||
48 | 4 => 'api', |
||
49 | 5 => 'ui', |
||
50 | 6 => 'debug', |
||
51 | 7 => 'generator', |
||
52 | 8 => 'laravel5', |
||
53 | 9 => 'sample:ui', |
||
54 | 10 => 'sample:auth', |
||
55 | ]; |
||
56 | |||
57 | /** |
||
58 | * @var string |
||
59 | */ |
||
60 | protected $default_skeleton = 'sample:ui'; |
||
61 | |||
62 | /** |
||
63 | * Execute the console command. |
||
64 | * |
||
65 | * @param \Jumilla\Addomnipot\Laravel\Addons\AddonGenerator $generator |
||
66 | * |
||
67 | * @return mixed |
||
68 | */ |
||
69 | 3 | public function handle(Filesystem $filesystem, AddonEnvironment $env, AddonGenerator $generator) |
|
114 | } |
||
115 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.