Completed
Push — master ( b59f7d...df9538 )
by Nicolas
04:15
created

ModuleDeleteCommand::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 6
ccs 4
cts 4
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Nwidart\Modules\Commands;
4
5
use Illuminate\Console\Command;
6
use Symfony\Component\Console\Input\InputArgument;
7
8
class ModuleDeleteCommand extends Command
9
{
10
    protected $name = 'module:delete';
11
    protected $description = 'Delete a module from the application';
12
13 2
    public function handle()
14
    {
15 2
        $this->laravel['modules']->delete($this->argument('module'));
16
17 2
        $this->info("Module {$this->argument('module')} has been deleted.");
18 2
    }
19
20 124
    protected function getArguments()
21
    {
22
        return [
23 124
            ['module', InputArgument::REQUIRED, 'The name of module to delete.'],
24
        ];
25
    }
26
}
27