1 | <?php |
||
19 | class ProfileValidate extends Model implements ModelInterface |
||
20 | { |
||
21 | /** |
||
22 | * Current profile (user) model. |
||
23 | * |
||
24 | * @var RbacIdentityInterface |
||
25 | */ |
||
26 | private $profileModel; |
||
27 | |||
28 | /** |
||
29 | * Auth manager. |
||
30 | * |
||
31 | * @var ManagerInterface |
||
32 | */ |
||
33 | private $authManager; |
||
34 | |||
35 | /** |
||
36 | * Initialize. |
||
37 | */ |
||
38 | public function init() |
||
44 | |||
45 | /** |
||
46 | * @inheritdoc |
||
47 | */ |
||
48 | public function rules() |
||
61 | |||
62 | /** |
||
63 | * List if attributes. |
||
64 | * |
||
65 | * @return array |
||
66 | */ |
||
67 | public function attributes() |
||
73 | |||
74 | /** |
||
75 | * List if attribute labels. |
||
76 | * |
||
77 | * @inheritdoc |
||
78 | */ |
||
79 | public function attributeLabels() |
||
85 | |||
86 | /** |
||
87 | * Get user name. |
||
88 | * |
||
89 | * @return string |
||
90 | */ |
||
91 | public function getUserName(): string |
||
95 | |||
96 | /** |
||
97 | * Set new roles values. |
||
98 | * |
||
99 | * @param mixed $roles |
||
100 | */ |
||
101 | public function setRoles($roles) |
||
105 | |||
106 | /** |
||
107 | * List of profile assigned roles. |
||
108 | * |
||
109 | * @return string[] |
||
110 | */ |
||
111 | public function getRoles() |
||
115 | |||
116 | /** |
||
117 | * Set profile (user) model. |
||
118 | * |
||
119 | * @param RbacIdentityInterface $model. |
||
|
|||
120 | * |
||
121 | * @throws InvalidConfigException |
||
122 | * |
||
123 | * @return void |
||
124 | */ |
||
125 | public function setProfileModel(RbacIdentityInterface $model): void |
||
129 | |||
130 | /** |
||
131 | * Returns profile (user) model. |
||
132 | * |
||
133 | * @return RbacIdentityInterface |
||
134 | */ |
||
135 | public function getProfileModel(): RbacIdentityInterface |
||
139 | |||
140 | /** |
||
141 | * Set auth manager. |
||
142 | * |
||
143 | * @param ManagerInterface $authManager |
||
144 | */ |
||
145 | public function setAuthManager(ManagerInterface $authManager) |
||
149 | |||
150 | /** |
||
151 | * Get auth manager. |
||
152 | * |
||
153 | * @return ManagerInterface |
||
154 | */ |
||
155 | public function getAuthManager(): ManagerInterface |
||
159 | |||
160 | /** |
||
161 | * Validate roles data format. |
||
162 | * |
||
163 | * @param $attribute |
||
164 | * |
||
165 | * @return bool |
||
166 | */ |
||
167 | public function validateRoles($attribute): bool |
||
176 | |||
177 | /** |
||
178 | * Save user data. |
||
179 | * |
||
180 | * @return bool |
||
181 | */ |
||
182 | public function save(): bool |
||
192 | |||
193 | /** |
||
194 | * Returns current model id. |
||
195 | * |
||
196 | * @return int |
||
197 | */ |
||
198 | public function getId(): int |
||
202 | |||
203 | /** |
||
204 | * Assign roles. |
||
205 | * |
||
206 | * @return void |
||
207 | */ |
||
208 | private function assignRoles(): void |
||
226 | } |
||
227 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.