| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class RoleCreate extends Command |
||
| 10 | { |
||
| 11 | use Commands; |
||
| 12 | |||
| 13 | protected $signature = 'acl:role-create {slug}'; |
||
| 14 | |||
| 15 | protected $description = 'Create a new role'; |
||
| 16 | |||
| 17 | public function handle() |
||
| 18 | { |
||
| 19 | if ($this->roleIsExist()) { |
||
| 20 | $this->error(sprintf('Role "%s" already exists!', $this->slug())); |
||
| 21 | |||
| 22 | return; |
||
| 23 | } |
||
| 24 | |||
| 25 | $this->create(); |
||
| 26 | } |
||
| 27 | |||
| 28 | protected function create() |
||
| 36 | } |
||
| 37 | } |
||
| 38 |