Completed
Push — master ( f2288e...d698ce )
by Daniel
01:37
created

ShopifyAdminUser::getRoles()   A

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
namespace CodeCloud\Bundle\ShopifyBundle\Security;
4
5
use Symfony\Component\Security\Core\User\UserInterface;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Security\Core\User\UserInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
class ShopifyAdminUser implements UserInterface
8
{
9
    /**
10
     * @var string
11
     */
12
    private $username;
13
14
    /**
15
     * @var string[]
16
     */
17
    private $roles = [];
18
19
    /**
20
     * @var string
21
     */
22
    private $authToken;
23
24
    /**
25
     * @param string $username
26
     * @param string[] $roles
27
     * @param string|null $authToken
28
     */
29
    public function __construct($username, array $roles, $authToken = null)
30
    {
31
        $this->username = $username;
32
        $this->roles = $roles;
33
        $this->authToken = $authToken;
34
    }
35
36
    public function getRoles()
37
    {
38
        return $this->roles;
39
    }
40
41
    public function getPassword()
42
    {
43
        return $this->authToken;
44
    }
45
46
    public function getSalt()
47
    {
48
        return null;
49
    }
50
51
    public function getUsername()
52
    {
53
        return $this->username;
54
    }
55
56
    public function eraseCredentials()
57
    {
58
        $this->authToken = null;
59
    }
60
}
61