Completed
Push — next ( d59298...80f341 )
by Thomas
06:20 queued 01:49
created

UserEntity::eraseCredentials()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Oc\Entity;
4
5
use Oc\Repository\AbstractEntity;
6
use Symfony\Component\Security\Core\User\UserInterface;
7
8
class UserEntity extends AbstractEntity implements UserInterface
9
{
10
    /**
11
     * @var int
12
     */
13
    public $id;
14
15
    /**
16
     * @var string
17
     */
18
    public $username;
19
20
    /**
21
     * @var string
22
     */
23
    public $password;
24
25
    /**
26
     * @var string
27
     */
28
    public $email;
29
30
    /**
31
     * @var float
32
     */
33
    public $latitude;
34
35
    /**
36
     * @var float
37
     */
38
    public $longitude;
39
40
    /**
41
     * @var bool
42
     */
43
    public $isActive;
44
45
    /**
46
     * @var string
47
     */
48
    public $firstname;
49
50
    /**
51
     * @var string
52
     */
53
    public $lastname;
54
55
    /**
56
     * @var string
57
     */
58
    public $country;
59
60
    /**
61
     * @var string
62
     */
63
    public $language;
64
65
    /**
66
     * @var array
67
     */
68
    public $roles;
69
70
    /**
71
     * Checks if the entity is new.
72
     */
73
    public function isNew(): bool
74
    {
75
        return $this->id === null;
76
    }
77
78
    public function getRoles(): array
79
    {
80
        return $this->roles;
81
    }
82
83
    public function getPassword(): ?string
84
    {
85
        return $this->password;
86
    }
87
88
    public function getSalt(): string
89
    {
90
        return '';
91
    }
92
93
    public function getUsername(): string
94
    {
95
        return $this->username;
96
    }
97
98
    public function eraseCredentials(): void
99
    {
100
    }
101
}
102