Passed
Push — master ( 32dee0...5d2de3 )
by Andrea Marco
13:08 queued 11s
created

MakeConsoleTaskerCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 31
ccs 0
cts 2
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 5 1
1
<?php
2
3
namespace Cerbero\ConsoleTasker\Console\Commands;
4
5
use Cerbero\ConsoleTasker\Console\Tasks\CreateCommand;
6
use Cerbero\ConsoleTasker\Console\Tasks\CreateCommandTasks;
7
use Cerbero\ConsoleTasker\Traits\RunsTasks;
8
use Illuminate\Console\Command;
9
10
/**
11
 * The Artisan command to generate console taskers.
12
 *
13
 */
14
class MakeConsoleTaskerCommand extends Command
15
{
16
    use RunsTasks;
17
18
    /**
19
     * The name and signature of the console command.
20
     *
21
     * @var string
22
     */
23
    protected $signature = 'make:console-tasker
24
                            {name : The name of the command}
25
                            {--c|command=command:name : The terminal command that should be assigned}
26
                            {--t|tasks= : Comma-separated list of tasks to generate}';
27
28
    /**
29
     * The console command description.
30
     *
31
     * @var string
32
     */
33
    protected $description = 'Create a new console tasker';
34
35
    /**
36
     * Execute the console command.
37
     *
38
     * @return void
39
     */
40
    public function handle()
41
    {
42
        $this->runTasks([
43
            CreateCommand::class,
44
            CreateCommandTasks::class,
45
        ]);
46
    }
47
}
48