UserRole::getRole()   A
last analyzed

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 0
1
<?php
2
3
namespace Starkerxp\UserBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Starkerxp\StructureBundle\Entity\TimestampInterface;
7
8
/**
9
 * RoleUser
10
 *
11
 * @ORM\Table(name="user_role", indexes={
12
 *  @ORM\Index(columns={"created_at"}),
13
 *  @ORM\Index(columns={"updated_at"})
14
 * })
15
 * @ORM\Entity()
16
 */
17
class UserRole implements TimestampInterface
18
{
19
    use \Starkerxp\StructureBundle\Entity\IdTrait;
20
    use \Starkerxp\StructureBundle\Entity\TimestampTrait;
21
22
    /**
23
     * @var array
24
     *
25
     * @ORM\Column(name="roles", type="json_array", nullable=false)
26
     */
27
    protected $role;
28
29
    /**
30
     * RoleUser constructor.
31
     * @param array $roles
32
     */
33
    public function __construct($roles)
34
    {
35
        $this->role = $roles;
36
    }
37
38
    /**
39
     * @return array
40
     */
41
    public function getRole()
42
    {
43
        return $this->role;
44
    }
45
46
    /**
47
     * @param array $role
48
     */
49
    public function setRole($role)
50
    {
51
        $this->role = $role;
52
    }
53
54
}
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...
55