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