User   A
last analyzed

Complexity

Total Complexity 13

Size/Duplication

Total Lines 176
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 13
lcom 1
cbo 1
dl 0
loc 176
ccs 0
cts 56
cp 0
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getName() 0 4 1
A getCreatedAt() 0 4 1
A getUpdatedAt() 0 4 1
A getDeletedAt() 0 4 1
A setDeletedAt() 0 4 1
A setCreatedAt() 0 6 1
A setUpdatedAt() 0 6 1
1
<?php declare(strict_types=1);
2
3
/**
4
 * This file is part of Packy.
5
 *
6
 * (c) Peter Nijssen
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace AppBundle\Entity;
13
14
use FOS\UserBundle\Model\User as BaseUser;
15
16
class User extends BaseUser
17
{
18
    /**
19
     * @var int
20
     */
21
    protected $id;
22
23
    /**
24
     * @var string
25
     */
26
    private $firstName;
27
28
    /**
29
     * @var string
30
     */
31
    private $lastName;
32
33
    /**
34
     * @var \DateTime
35
     */
36
    private $createdAt;
37
38
    /**
39
     * @var \DateTime
40
     */
41
    private $updatedAt;
42
43
    /**
44
     * @var \DateTime
45
     */
46
    private $deletedAt;
47
48
    /**
49
     * Constructor.
50
     */
51
    public function __construct()
52
    {
53
        parent::__construct();
54
    }
55
56
    /**
57
     * Get id.
58
     *
59
     * @return int
60
     */
61
    public function getId()
62
    {
63
        return $this->id;
64
    }
65
66
    /**
67
     * Get first name of user.
68
     *
69
     * @return string
70
     */
71
    public function getFirstName()
72
    {
73
        return $this->firstName;
74
    }
75
76
    /**
77
     * Set user first name.
78
     *
79
     * @param string $firstName
80
     *
81
     * @return User
82
     */
83
    public function setFirstName($firstName)
84
    {
85
        $this->firstName = $firstName;
86
87
        return $this;
88
    }
89
90
    /**
91
     * Get last name of user.
92
     *
93
     * @return string
94
     */
95
    public function getLastName()
96
    {
97
        return $this->lastName;
98
    }
99
100
    /**
101
     * Set user last name.
102
     *
103
     * @param string $lastName
104
     *
105
     * @return User
106
     */
107
    public function setLastName($lastName)
108
    {
109
        $this->lastName = $lastName;
110
111
        return $this;
112
    }
113
114
    /**
115
     * Get the name of a user.
116
     *
117
     * @return string
118
     */
119
    public function getName()
120
    {
121
        return $this->getFirstName() . ' ' . $this->getLastName();
122
    }
123
124
    /**
125
     * Get creation date.
126
     *
127
     * @return \DateTime
128
     */
129
    public function getCreatedAt()
130
    {
131
        return $this->createdAt;
132
    }
133
134
    /**
135
     * Get update date.
136
     *
137
     * @return \DateTime
138
     */
139
    public function getUpdatedAt()
140
    {
141
        return $this->updatedAt;
142
    }
143
144
    /**
145
     * Get deletion date.
146
     *
147
     * @return \DateTime
148
     */
149
    public function getDeletedAt()
150
    {
151
        return $this->deletedAt;
152
    }
153
154
    /**
155
     * Set deletion date.
156
     *
157
     * @param \DateTime $deletedAt
158
     */
159
    public function setDeletedAt(\DateTime $deletedAt = null)
160
    {
161
        $this->deletedAt = $deletedAt;
162
    }
163
164
    /**
165
     * Set createdAt.
166
     *
167
     * @param \DateTime $createdAt
168
     *
169
     * @return User
170
     */
171
    public function setCreatedAt($createdAt)
172
    {
173
        $this->createdAt = $createdAt;
174
175
        return $this;
176
    }
177
178
    /**
179
     * Set updatedAt.
180
     *
181
     * @param \DateTime $updatedAt
182
     *
183
     * @return User
184
     */
185
    public function setUpdatedAt($updatedAt)
186
    {
187
        $this->updatedAt = $updatedAt;
188
189
        return $this;
190
    }
191
}
192