1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace Platine\App\Param; |
||
6 | |||
7 | use Platine\Framework\Form\Param\BaseParam; |
||
8 | use Platine\Orm\Entity; |
||
9 | |||
10 | /** |
||
11 | * @class UserParam |
||
12 | * @package Platine\App\Param |
||
13 | * @template TEntity as Entity |
||
14 | */ |
||
15 | class UserParam extends BaseParam |
||
16 | { |
||
17 | /** |
||
18 | * The username field |
||
19 | * @var string |
||
20 | */ |
||
21 | protected string $username; |
||
22 | |||
23 | /** |
||
24 | * The lastname field |
||
25 | * @var string |
||
26 | */ |
||
27 | protected string $lastname; |
||
28 | |||
29 | /** |
||
30 | * The firstname field |
||
31 | * @var string |
||
32 | */ |
||
33 | protected string $firstname; |
||
34 | |||
35 | /** |
||
36 | * The email field |
||
37 | * @var string |
||
38 | */ |
||
39 | protected string $email; |
||
40 | |||
41 | /** |
||
42 | * The password field |
||
43 | * @var string |
||
44 | */ |
||
45 | protected string $password; |
||
46 | |||
47 | /** |
||
48 | * The password confirm field |
||
49 | * @var string |
||
50 | */ |
||
51 | protected string $passwordConfirm; |
||
52 | |||
53 | /** |
||
54 | * The status field |
||
55 | * @var string |
||
56 | */ |
||
57 | protected string $status; |
||
58 | |||
59 | /** |
||
60 | * The role field |
||
61 | * @var string|null |
||
62 | */ |
||
63 | protected ?string $role = null; |
||
64 | |||
65 | /** |
||
66 | * The roles field |
||
67 | * @var array<int> |
||
68 | */ |
||
69 | protected array $roles = []; |
||
70 | |||
71 | |||
72 | /** |
||
73 | * @param TEntity $entity |
||
0 ignored issues
–
show
|
|||
74 | * @return $this |
||
75 | */ |
||
76 | public function fromEntity(Entity $entity): self |
||
77 | { |
||
78 | $this->username = $entity->username; |
||
79 | $this->lastname = $entity->lastname; |
||
80 | $this->firstname = $entity->firstname; |
||
81 | $this->email = $entity->email; |
||
82 | $this->password = $entity->password; |
||
83 | $this->status = $entity->status; |
||
84 | $this->role = $entity->role; |
||
85 | |||
86 | return $this; |
||
87 | } |
||
88 | |||
89 | /** |
||
90 | * Return the username value |
||
91 | * @return string |
||
92 | */ |
||
93 | public function getUsername(): string |
||
94 | { |
||
95 | return $this->username; |
||
96 | } |
||
97 | |||
98 | /** |
||
99 | * Return the lastname value |
||
100 | * @return string |
||
101 | */ |
||
102 | public function getLastname(): string |
||
103 | { |
||
104 | return $this->lastname; |
||
105 | } |
||
106 | |||
107 | /** |
||
108 | * Return the firstname value |
||
109 | * @return string |
||
110 | */ |
||
111 | public function getFirstname(): string |
||
112 | { |
||
113 | return $this->firstname; |
||
114 | } |
||
115 | |||
116 | /** |
||
117 | * Return the email value |
||
118 | * @return string |
||
119 | */ |
||
120 | public function getEmail(): string |
||
121 | { |
||
122 | return $this->email; |
||
123 | } |
||
124 | |||
125 | /** |
||
126 | * Return the password value |
||
127 | * @return string |
||
128 | */ |
||
129 | public function getPassword(): string |
||
130 | { |
||
131 | return $this->password; |
||
132 | } |
||
133 | |||
134 | /** |
||
135 | * Return the password confirm value |
||
136 | * @return string |
||
137 | */ |
||
138 | public function getPasswordConfirm(): string |
||
139 | { |
||
140 | return $this->passwordConfirm; |
||
141 | } |
||
142 | |||
143 | /** |
||
144 | * Return the status value |
||
145 | * @return string |
||
146 | */ |
||
147 | public function getStatus(): string |
||
148 | { |
||
149 | return $this->status; |
||
150 | } |
||
151 | |||
152 | /** |
||
153 | * Return the role value |
||
154 | * @return string|null |
||
155 | */ |
||
156 | public function getRole(): ?string |
||
157 | { |
||
158 | return $this->role; |
||
159 | } |
||
160 | |||
161 | /** |
||
162 | * Return the roles |
||
163 | * @return array<int> |
||
164 | */ |
||
165 | public function getRoles(): array |
||
166 | { |
||
167 | return $this->roles; |
||
168 | } |
||
169 | |||
170 | |||
171 | /** |
||
172 | * Set the username value |
||
173 | * @param string $username |
||
174 | * @return $this |
||
175 | */ |
||
176 | public function setUsername(string $username): self |
||
177 | { |
||
178 | $this->username = $username; |
||
179 | |||
180 | return $this; |
||
181 | } |
||
182 | |||
183 | /** |
||
184 | * Set the lastname value |
||
185 | * @param string $lastname |
||
186 | * @return $this |
||
187 | */ |
||
188 | public function setLastname(string $lastname): self |
||
189 | { |
||
190 | $this->lastname = $lastname; |
||
191 | |||
192 | return $this; |
||
193 | } |
||
194 | |||
195 | /** |
||
196 | * Set the firstname value |
||
197 | * @param string $firstname |
||
198 | * @return $this |
||
199 | */ |
||
200 | public function setFirstname(string $firstname): self |
||
201 | { |
||
202 | $this->firstname = $firstname; |
||
203 | |||
204 | return $this; |
||
205 | } |
||
206 | |||
207 | /** |
||
208 | * Set the email value |
||
209 | * @param string $email |
||
210 | * @return $this |
||
211 | */ |
||
212 | public function setEmail(string $email): self |
||
213 | { |
||
214 | $this->email = $email; |
||
215 | |||
216 | return $this; |
||
217 | } |
||
218 | |||
219 | /** |
||
220 | * Set the password value |
||
221 | * @param string $password |
||
222 | * @return $this |
||
223 | */ |
||
224 | public function setPassword(string $password): self |
||
225 | { |
||
226 | $this->password = $password; |
||
227 | |||
228 | return $this; |
||
229 | } |
||
230 | |||
231 | /** |
||
232 | * Set the password confirm value |
||
233 | * @param string $passwordConfirm |
||
234 | * @return $this |
||
235 | */ |
||
236 | public function setPasswordConfirm(string $passwordConfirm): self |
||
237 | { |
||
238 | $this->passwordConfirm = $passwordConfirm; |
||
239 | |||
240 | return $this; |
||
241 | } |
||
242 | |||
243 | /** |
||
244 | * Set the status value |
||
245 | * @param string $status |
||
246 | * @return $this |
||
247 | */ |
||
248 | public function setStatus(string $status): self |
||
249 | { |
||
250 | $this->status = $status; |
||
251 | |||
252 | return $this; |
||
253 | } |
||
254 | |||
255 | /** |
||
256 | * Set the role value |
||
257 | * @param string|null $role |
||
258 | * @return $this |
||
259 | */ |
||
260 | public function setRole(?string $role): self |
||
261 | { |
||
262 | $this->role = $role; |
||
263 | |||
264 | return $this; |
||
265 | } |
||
266 | |||
267 | /** |
||
268 | * Set the roles |
||
269 | * @param array<int> $roles |
||
270 | * @return $this |
||
271 | */ |
||
272 | public function setRoles(array $roles): self |
||
273 | { |
||
274 | $this->roles = $roles; |
||
275 | return $this; |
||
276 | } |
||
277 | } |
||
278 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths