Total Complexity | 7 |
Total Lines | 56 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
23 | class ApiKeyUser implements ApiKeyUserInterface, UserInterface |
||
24 | { |
||
25 | private readonly string $identifier; |
||
26 | private readonly string $apiKeyIdentifier; |
||
27 | |||
28 | /** |
||
29 | * @var array<int, string> |
||
30 | */ |
||
31 | private readonly array $roles; |
||
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | 20 | public function __construct(ApiKey $apiKey, array $roles) |
|
41 | } |
||
42 | |||
43 | 2 | public function getUserIdentifier(): string |
|
44 | { |
||
45 | 2 | return $this->identifier; |
|
46 | } |
||
47 | |||
48 | 7 | public function getApiKeyIdentifier(): string |
|
49 | { |
||
50 | 7 | return $this->apiKeyIdentifier; |
|
51 | } |
||
52 | |||
53 | 15 | public function getRoles(): array |
|
54 | { |
||
55 | 15 | return $this->roles; |
|
56 | } |
||
57 | |||
58 | /** |
||
59 | * @codeCoverageIgnore |
||
60 | */ |
||
61 | public function getPassword(): ?string |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * @codeCoverageIgnore |
||
68 | */ |
||
69 | public function getSalt(): ?string |
||
70 | { |
||
71 | return null; |
||
72 | } |
||
73 | |||
74 | /** |
||
75 | * @codeCoverageIgnore |
||
76 | */ |
||
77 | public function eraseCredentials(): void |
||
79 | } |
||
80 | } |
||
81 |