Role   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getName() 0 4 1
1
<?php
2
3
namespace App\Entity;
4
5
use Doctrine\Common\Collections\ArrayCollection;
6
7
/**
8
 * @Entity
9
 * @Table(name="roles")
10
 */
11
class Role
12
{
13
    /**
14
     * @Id
15
     * @Column(type="integer")
16
     * @GeneratedValue
17
     */
18
    protected $id;
19
20
    /**
21
     * @Column(type="string", length=32)
22
     */
23
    protected $name;
24
25
    /**
26
     * @ManyToMany(targetEntity="User", mappedBy="roles")
27
     */
28
    protected $users;
29
30
    public function __construct()
31
    {
32
        $this->users = new ArrayCollection();
33
    }
34
35
    public function getName()
36
    {
37
        return $this->name;
38
    }
39
}
40