Total Complexity | 7 |
Total Lines | 78 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class UserCommand extends Command |
||
8 | { |
||
9 | /** |
||
10 | * @var \Illuminate\Foundation\Auth\User|string|null |
||
11 | */ |
||
12 | protected $user; |
||
13 | |||
14 | /** |
||
15 | * @var \Illuminate\Database\Eloquent\Model|string|null |
||
16 | */ |
||
17 | protected $permission; |
||
18 | |||
19 | /** |
||
20 | * @var \Illuminate\Database\Eloquent\Model|string|null |
||
21 | */ |
||
22 | protected $role; |
||
23 | |||
24 | /** |
||
25 | * UserCommand constructor. |
||
26 | */ |
||
27 | public function __construct() |
||
28 | { |
||
29 | parent::__construct(); |
||
30 | |||
31 | $this->user = config('user-commands.user'); |
||
32 | $this->permission = config('user-commands.permission.model'); |
||
33 | $this->role = config('user-commands.role.model'); |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Create a new user instance |
||
38 | * |
||
39 | * @return mixed |
||
40 | */ |
||
41 | protected function newUserInstance() |
||
42 | { |
||
43 | return new $this->user; |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * Create a new permission instance |
||
48 | * |
||
49 | * @return mixed |
||
50 | */ |
||
51 | protected function newPermissionInstance() |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * Create a new role instance |
||
58 | * |
||
59 | * @return mixed |
||
60 | */ |
||
61 | protected function newRoleInstance() |
||
62 | { |
||
63 | return new $this->role; |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * Get user model |
||
68 | * |
||
69 | * @return \Illuminate\Database\Eloquent\Model|null |
||
70 | */ |
||
71 | protected function getUserModel() |
||
85 | } |
||
86 | } |
||
87 |
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.