Passed
Push — dependabot/npm_and_yarn/docs/w... ( a770a9...3a5b31 )
by
unknown
07:47
created

ModuleMakeDeprecated   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 36
ccs 0
cts 5
cp 0
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 7 1
1
<?php
2
3
namespace A17\Twill\Commands;
4
5
use Illuminate\Support\Str;
6
7
class ModuleMakeDeprecated extends Command
8
{
9
    /**
10
     * The name and signature of the console command.
11
     *
12
     * @var string
13
     */
14
    protected $signature = 'twill:module {moduleName}
15
        {--B|hasBlocks}
16
        {--T|hasTranslation}
17
        {--S|hasSlug}
18
        {--M|hasMedias}
19
        {--F|hasFiles}
20
        {--P|hasPosition}
21
        {--R|hasRevisions}
22
        {--all}';
23
24
    /**
25
     * The console command description.
26
     *
27
     * @var string
28
     */
29
    protected $description = 'Create a new Twill Module (deprecated, use twill:make:module)';
30
31
    /**
32
     * Executes the console command.
33
     *
34
     * @return mixed
35
     */
36
    public function handle()
37
    {
38
        $this->call('twill:make:module', [
39
            'moduleName' => $this->argument('moduleName'),
40
        ] + collect($this->options())->mapWithKeys(function ($value, $key) {
41
            return ["--{$key}" => $value];
42
        })->toArray());
43
    }
44
}
45