Conditions | 3 |
Paths | 3 |
Total Lines | 19 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | public function handle() |
||
28 | { |
||
29 | $user = $this->getUserModel(); |
||
30 | |||
31 | if (is_null($user)) { |
||
32 | $this->error('Oops, the user was not found!'); |
||
33 | return 1; |
||
34 | } |
||
35 | |||
36 | if (!method_exists($user, 'restore')) { |
||
37 | $this->error('Oops, user does not use softdelete!'); |
||
38 | return 1; |
||
39 | } |
||
40 | |||
41 | $user->restore(); |
||
42 | |||
43 | $this->info('User restored successfully!'); |
||
44 | |||
45 | return 0; |
||
46 | } |
||
69 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.