1 | <?php |
||
19 | trait UserTrait |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * @var int|null |
||
24 | */ |
||
25 | private $userId; |
||
26 | |||
27 | /** |
||
28 | * @var UserElement|null |
||
29 | */ |
||
30 | private $user; |
||
31 | |||
32 | /** |
||
33 | * Set associated userId |
||
34 | * |
||
35 | * @param $id |
||
36 | * @return $this |
||
37 | */ |
||
38 | public function setUserId(int $id) |
||
53 | |||
54 | /** |
||
55 | * Get associated userId |
||
56 | * |
||
57 | * @return int|null |
||
58 | */ |
||
59 | public function getUserId() |
||
63 | |||
64 | |||
65 | /** |
||
66 | * Associate a user |
||
67 | * |
||
68 | * @param $user |
||
69 | * @return $this |
||
70 | */ |
||
71 | public function setUser($user) |
||
91 | |||
92 | /** |
||
93 | * @return UserElement|null |
||
94 | */ |
||
95 | public function getUser() |
||
121 | |||
122 | /** |
||
123 | * @param $user |
||
124 | * @return UserElement|null |
||
125 | */ |
||
126 | private function findUserElement($user) |
||
144 | |||
145 | /** |
||
146 | * @return array |
||
147 | */ |
||
148 | protected function userRules(): array |
||
171 | |||
172 | /** |
||
173 | * @return array |
||
174 | */ |
||
175 | protected function userFields(): array |
||
182 | |||
183 | /** |
||
184 | * @return array |
||
185 | */ |
||
186 | protected function userAttributes(): array |
||
193 | |||
194 | /** |
||
195 | * @return array |
||
196 | */ |
||
197 | protected function userAttributeLabels(): array |
||
204 | } |
||
205 |
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..