1 | <?php |
||
16 | trait SaitoUserTrait |
||
17 | { |
||
18 | /** |
||
19 | * User ID |
||
20 | * |
||
21 | * @var int |
||
22 | */ |
||
23 | protected $_id = null; |
||
24 | |||
25 | /** |
||
26 | * Stores if a user is logged in |
||
27 | * |
||
28 | * @var bool |
||
29 | */ |
||
30 | protected $_isLoggedIn = false; |
||
31 | |||
32 | /** |
||
33 | * User settings |
||
34 | * |
||
35 | * @var array |
||
36 | */ |
||
37 | protected $_settings = null; |
||
38 | |||
39 | /** |
||
40 | * {@inheritDoc} |
||
41 | */ |
||
42 | public function setSettings($settings) |
||
84 | |||
85 | /** |
||
86 | * Get single user setting. |
||
87 | * |
||
88 | * @param string $setting setting-key |
||
89 | * @return null|mixed null if setting not found |
||
90 | */ |
||
91 | public function get($setting) |
||
99 | |||
100 | /** |
||
101 | * Set single setting. |
||
102 | * |
||
103 | * @param string $setting setting-key |
||
104 | * @param mixed $value value to set |
||
105 | * @return void |
||
106 | */ |
||
107 | public function set($setting, $value) |
||
111 | |||
112 | /** |
||
113 | * {@inheritDoc} |
||
114 | */ |
||
115 | public function getSettings() |
||
119 | |||
120 | /** |
||
121 | * {@inheritDoc} |
||
122 | */ |
||
123 | public function getId() |
||
127 | |||
128 | /** |
||
129 | * {@inheritDoc} |
||
130 | */ |
||
131 | public function isLoggedIn() |
||
135 | |||
136 | /** |
||
137 | * {@inheritDoc} |
||
138 | */ |
||
139 | public function isUser($user) |
||
151 | |||
152 | /** |
||
153 | * Checks if user is forbidden. |
||
154 | * |
||
155 | * @return bool |
||
156 | */ |
||
157 | public function isLocked(): bool |
||
161 | |||
162 | /** |
||
163 | * Checks if user is forbidden. |
||
164 | * |
||
165 | * @return bool |
||
166 | */ |
||
167 | public function isActivated() : bool |
||
171 | |||
172 | /** |
||
173 | * Get role. |
||
174 | * |
||
175 | * @return string |
||
176 | */ |
||
177 | public function getRole() |
||
185 | |||
186 | /** |
||
187 | * Check if user has permission to access a resource. |
||
188 | * |
||
189 | * @param string $resource resource |
||
190 | * @return bool |
||
191 | */ |
||
192 | public function permission($resource) |
||
198 | } |
||
199 |
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..