Total Complexity | 3 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class RoleDelete extends Command |
||
10 | { |
||
11 | use Commands; |
||
12 | |||
13 | protected $signature = 'acl:role-delete {slug|ID or role slug}'; |
||
14 | |||
15 | protected $description = 'Deleting a role'; |
||
16 | |||
17 | public function handle() |
||
18 | { |
||
19 | if ($this->roleIsDoesntExist()) { |
||
20 | $this->error(sprintf('Role "%s" doesn\'t exists!', $this->slug())); |
||
21 | |||
22 | return; |
||
23 | } |
||
24 | |||
25 | $this->remove(); |
||
26 | } |
||
27 | |||
28 | protected function remove() |
||
35 | } |
||
36 | } |
||
37 |