Passed
Push — master ( 241b61...cc68cc )
by Julito
09:18
created

ResourceRight::setId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CoreBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
9
/**
10
 * @ORM\Entity
11
 * @ORM\Table(name="resource_right")
12
 */
13
class ResourceRight
14
{
15
    /**
16
     * @ORM\Id
17
     * @ORM\Column(type="integer")
18
     * @ORM\GeneratedValue(strategy="AUTO")
19
     */
20
    protected $id;
21
22
    /**
23
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\ResourceLink", inversedBy="resourceRight")
24
     * @ORM\JoinColumn(name="resource_link_id", referencedColumnName="id", onDelete="CASCADE")
25
     */
26
    protected $resourceLink;
27
28
    /**
29
     * @var string
30
     *
31
     * @ORM\Column(name="role", type="string", length=255, nullable=false)
32
     */
33
    protected $role;
34
35
    /**
36
     * @var string
37
     *
38
     * @ORM\Column(name="mask", type="integer", nullable=false)
39
     */
40
    protected $mask;
41
42
    public function __toString(): string
43
    {
44
        return (string) $this->getId();
45
    }
46
47
    /**
48
     * @return int
49
     */
50
    public function getId()
51
    {
52
        return $this->id;
53
    }
54
55
    /**
56
     * @return string
57
     */
58
    public function getMask()
59
    {
60
        return $this->mask;
61
    }
62
63
    /**
64
     * @param string $mask
65
     *
66
     * @return $this
67
     */
68
    public function setMask($mask)
69
    {
70
        $this->mask = $mask;
71
72
        return $this;
73
    }
74
75
    /**
76
     * @return ResourceLink
77
     */
78
    public function getResourceLink()
79
    {
80
        return $this->resourceLink;
81
    }
82
83
    public function setResourceLink(ResourceLink $resourceLink): self
84
    {
85
        $this->resourceLink = $resourceLink;
86
87
        return $this;
88
    }
89
90
    public function getRole(): string
91
    {
92
        return $this->role;
93
    }
94
95
    public function setRole(string $role): self
96
    {
97
        $this->role = $role;
98
99
        return $this;
100
    }
101
}
102