| @@ 2319-2331 (lines=13) @@ | ||
| 2316 | return $this; |
|
| 2317 | } |
|
| 2318 | ||
| 2319 | public function addRole($role) |
|
| 2320 | { |
|
| 2321 | $role = strtoupper($role); |
|
| 2322 | if ($role === static::ROLE_DEFAULT) { |
|
| 2323 | return $this; |
|
| 2324 | } |
|
| 2325 | ||
| 2326 | if (!in_array($role, $this->roles, true)) { |
|
| 2327 | $this->roles[] = $role; |
|
| 2328 | } |
|
| 2329 | ||
| 2330 | return $this; |
|
| 2331 | } |
|
| 2332 | ||
| 2333 | /** |
|
| 2334 | * Serializes the user. |
|
| @@ 2393-2405 (lines=13) @@ | ||
| 2390 | return $this; |
|
| 2391 | } |
|
| 2392 | ||
| 2393 | public function addRole($role) |
|
| 2394 | { |
|
| 2395 | $role = strtoupper($role); |
|
| 2396 | if ($role === static::ROLE_DEFAULT) { |
|
| 2397 | return $this; |
|
| 2398 | } |
|
| 2399 | ||
| 2400 | if (!in_array($role, $this->roles, true)) { |
|
| 2401 | $this->roles[] = $role; |
|
| 2402 | } |
|
| 2403 | ||
| 2404 | return $this; |
|
| 2405 | } |
|
| 2406 | ||
| 2407 | /** |
|
| 2408 | * Serializes the user. |
|