Completed
Push — master ( 8f16eb...0002ba )
by Guillaume
04:27
created

RoleUtilisateur::setRoles()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Starkerxp\UtilisateurBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Starkerxp\StructureBundle\Entity\Entity;
7
use Symfony\Component\Security\Core\Role\RoleInterface;
8
9
/**
10
 * RoleUtilisateur
11
 *
12
 * @ORM\Table(name="utilisateur_role")
13
 * @ORM\Entity()
14
 */
15
class RoleUtilisateur extends Entity implements RoleInterface
16
{
17
18
    /**
19
     * @var array
20
     *
21
     * @ORM\Column(name="roles", type="json_array", nullable=false)
22
     */
23
    protected $roles;
24
25
    /**
26
     * RoleUtilisateur constructor.
27
     * @param array $roles
28
     */
29
    public function __construct($roles)
30
    {
31
        $this->roles = $roles;
32
    }
33
34
    /**
35
     * @return array
36
     */
37
    public function getRoles()
38
    {
39
        return $this->roles;
40
    }
41
42
    /**
43
     * @param array $roles
44
     */
45
    public function setRoles($roles)
46
    {
47
        $this->roles = $roles;
48
    }
49
50
    public function getRole()
51
    {
52
        return $this->roles;
53
    }
54
55
56
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
57