1 | <?php |
||
12 | class User extends EloquentUser implements UserInterface |
||
13 | { |
||
14 | use PresentableTrait; |
||
15 | |||
16 | protected $fillable = [ |
||
17 | 'email', |
||
18 | 'password', |
||
19 | 'permissions', |
||
20 | 'first_name', |
||
21 | 'last_name', |
||
22 | ]; |
||
23 | |||
24 | /** |
||
25 | * {@inheritDoc} |
||
26 | */ |
||
27 | protected $loginNames = ['email']; |
||
28 | |||
29 | protected $presenter = UserPresenter::class; |
||
30 | |||
31 | public function __construct(array $attributes = []) |
||
38 | |||
39 | /** |
||
40 | * Checks if a user belongs to the given Role ID |
||
41 | * @param int $roleId |
||
42 | * @return bool |
||
43 | */ |
||
44 | public function hasRoleId($roleId) |
||
48 | |||
49 | /** |
||
50 | * Checks if a user belongs to the given Role Name |
||
51 | * @param string $name |
||
52 | * @return bool |
||
53 | */ |
||
54 | public function hasRoleName($name) |
||
58 | |||
59 | /** |
||
60 | * Check if the current user is activated |
||
61 | * @return bool |
||
62 | */ |
||
63 | public function isActivated() |
||
71 | |||
72 | /** |
||
73 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
74 | */ |
||
75 | public function api_keys() |
||
79 | |||
80 | /** |
||
81 | * Get the first available api key |
||
82 | * @return string |
||
83 | */ |
||
84 | public function getFirstApiKey() |
||
94 | |||
95 | public function __call($method, $parameters) |
||
112 | |||
113 | /** |
||
114 | * Check if the user has access to the given permission name |
||
115 | * @param string $permission |
||
116 | * @return boolean |
||
117 | */ |
||
118 | public function hasAccess($permission) |
||
124 | } |
||
125 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..