| Total Complexity | 3 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 27 | class User implements UserInterface { |
||
| 28 | |||
| 29 | use ArrayRolesTrait; |
||
| 30 | use IntegerIdTrait; |
||
| 31 | use StringSaltTrait; |
||
| 32 | use StringPasswordTrait; |
||
| 33 | use StringUsernameTrait; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Constructor. |
||
| 37 | * |
||
| 38 | * @param string|null $username The username. |
||
| 39 | * @param string|null $password The password. |
||
| 40 | * @param array $roles The roles. |
||
| 41 | */ |
||
| 42 | public function __construct(?string $username = null, ?string $password = null, array $roles = []) { |
||
| 43 | $this->setPassword($password); |
||
| 44 | $this->setRoles($roles); |
||
| 45 | $this->setUsername($username); |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * {@inheritdoc} |
||
| 50 | */ |
||
| 51 | public function eraseCredentials(): void { |
||
| 52 | // NOTHING TO DO |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * {@inheritdoc} |
||
| 57 | */ |
||
| 58 | public function getUserIdentifier(): string { |
||
| 62 |