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

ModuleMakeDeprecated::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 7
ccs 0
cts 5
cp 0
crap 2
rs 10
c 1
b 0
f 0
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