GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ApiUser   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 35
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getRoles() 0 3 1
A getSalt() 0 3 1
A eraseCredentials() 0 2 1
A getUsername() 0 3 1
A getPassword() 0 3 1
A __construct() 0 4 1
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