ApiUser::getPassword()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Damax\Bundle\ApiAuthBundle\Security;
6
7
use Symfony\Component\Security\Core\User\UserInterface;
8
9
final class ApiUser implements UserInterface
10
{
11
    private const DEFAULT_ROLES = ['ROLE_API'];
12
13
    private $username;
14
    private $roles;
15
16
    public function __construct(string $username, array $roles = self::DEFAULT_ROLES)
17
    {
18
        $this->username = $username;
19
        $this->roles = $roles;
20
    }
21
22
    public function getUsername()
23
    {
24
        return $this->username;
25
    }
26
27
    public function getRoles(): array
28
    {
29
        return $this->roles;
30
    }
31
32
    public function getPassword(): string
33
    {
34
        return '';
35
    }
36
37
    public function getSalt(): string
38
    {
39
        return '';
40
    }
41
42
    public function eraseCredentials(): void
43
    {
44
    }
45
}
46