User   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 65
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getAccountId() 0 4 1
A getPassword() 0 4 1
A getNickname() 0 4 1
A getEmail() 0 4 1
A getRoles() 0 4 1
1
<?php
2
3
namespace App\Entity;
4
5
use Doctrine\Common\Collections\ArrayCollection;
6
7
/**
8
 * @Entity
9
 * @Table(name="users")
10
 */
11
class User
12
{
13
    /**
14
     * @Id
15
     * @Column(type="integer")
16
     * @GeneratedValue
17
     */
18
    protected $id;
19
20
    /**
21
     * @Column(type="string", length=128)
22
     */
23
    protected $accountId;
24
25
    /**
26
     * @Column(type="string", length=128)
27
     */
28
    protected $password;
29
30
    /**
31
     * @Column(type="string", length=32)
32
     */
33
    protected $nickname;
34
35
    /**
36
     * @Column(type="string", length=128)
37
     */
38
    protected $email;
39
40
    /**
41
     * @ManyToMany(targetEntity="Role", inversedBy="users")
42
     * @JoinTable(name="user_roles")
43
     */
44
    protected $roles;
45
46
    public function __construct()
47
    {
48
        $this->roles = new ArrayCollection();
49
    }
50
51
    public function getAccountId()
52
    {
53
        return $this->accountId;
54
    }
55
56
    public function getPassword()
57
    {
58
        return $this->password;
59
    }
60
61
    public function getNickname()
62
    {
63
        return $this->nickname;
64
    }
65
66
    public function getEmail()
67
    {
68
        return $this->email;
69
    }
70
71
    public function getRoles()
72
    {
73
        return $this->roles;
74
    }
75
}
76