Passed
Push — master ( 492dcf...32ce96 )
by Julito
09:05
created

ResourceRight   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 103
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 16
dl 0
loc 103
rs 10
c 0
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getRole() 0 3 1
A getResourceLink() 0 3 1
A setRole() 0 5 1
A getMask() 0 3 1
A getId() 0 3 1
A setId() 0 3 1
A setMask() 0 5 1
A setResourceLink() 0 5 1
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CoreBundle\Entity\Resource;
5
6
use Doctrine\ORM\Mapping as ORM;
7
8
/**
9
 * @ORM\Entity
10
 * @ORM\Table(name="resource_right")
11
 */
12
class ResourceRight
13
{
14
    /**
15
     * @ORM\Id
16
     * @ORM\Column(type="integer")
17
     * @ORM\GeneratedValue(strategy="AUTO")
18
     */
19
    protected $id;
20
21
    /**
22
     * @ORM\OneToOne(targetEntity="Chamilo\CoreBundle\Entity\Resource\ResourceLink", inversedBy="rights")
23
     * @ORM\JoinColumn(name="resource_link_id", referencedColumnName="id")
24
     */
25
    protected $resourceLink;
26
27
    /**
28
     * @var string
29
     *
30
     * @ORM\Column(name="role", type="string", length=255, nullable=false)
31
     */
32
    protected $role;
33
34
    /**
35
     * @var string
36
     *
37
     * @ORM\Column(name="mask", type="integer", nullable=false)
38
     */
39
    protected $mask;
40
41
    /**
42
     * @return int
43
     */
44
    public function getId()
45
    {
46
        return $this->id;
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    public function getMask()
53
    {
54
        return $this->mask;
55
    }
56
57
    /**
58
     * @param string $mask
59
     *
60
     * @return $this
61
     */
62
    public function setMask($mask)
63
    {
64
        $this->mask = $mask;
65
66
        return $this;
67
    }
68
69
    /**
70
     * @return mixed
71
     */
72
    public function getResourceLink()
73
    {
74
        return $this->resourceLink;
75
    }
76
77
    /**
78
     * @param mixed $resourceLink
79
     *
80
     * @return $this
81
     */
82
    public function setResourceLink($resourceLink)
83
    {
84
        $this->resourceLink = $resourceLink;
85
86
        return $this;
87
    }
88
89
    /**
90
     * @return string
91
     */
92
    public function getRole()
93
    {
94
        return $this->role;
95
    }
96
97
    /**
98
     * @param string $role
99
     *
100
     * @return $this
101
     */
102
    public function setRole($role)
103
    {
104
        $this->role = $role;
105
106
        return $this;
107
    }
108
109
    /**
110
     * @param int $id
111
     */
112
    public function setId($id)
113
    {
114
        $this->id = $id;
115
    }
116
}
117