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

MakeConsoleTaskerCommand::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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