| Conditions | 3 |
| Paths | 6 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function handle() |
||
| 16 | { |
||
| 17 | $user = $this->argument('user'); |
||
| 18 | try{ |
||
| 19 | $status = UserProviderFacade::makeAdmin($user, $this->option('super')); |
||
| 20 | $method = $status['type'] == 'success' ? 'info' : 'warn'; |
||
| 21 | |||
| 22 | $this->$method($status['message']); |
||
| 23 | } catch (\Exception $exception){ |
||
| 24 | $this->warn("Something went wrong!\nError: ". $exception->getMessage()); |
||
| 25 | } |
||
| 29 |