| Conditions | 2 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function fire() |
||
| 32 | { |
||
| 33 | $email = $this->argument('email'); |
||
| 34 | |||
| 35 | try { |
||
| 36 | $user = User::whereEmail($email)->firstOrFail(); |
||
| 37 | $user->delete(); |
||
| 38 | |||
| 39 | $this->info('User deleted.'); |
||
| 40 | } catch (ModelNotFoundException $e) { |
||
| 41 | $this->error('Did not find a user with the given email address'); |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 57 |