Passed
Push — master ( 8d1a37...25babe )
by Julito
22:45
created

UsergroupRelSession::setUsergroup()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/* For licensing terms, see /license.txt */
6
7
namespace Chamilo\CoreBundle\Entity;
8
9
use Doctrine\ORM\Mapping as ORM;
10
11
/**
12
 * UsergroupRelSession.
13
 *
14
 * @ORM\Table(name="usergroup_rel_session")
15
 * @ORM\Entity
16
 */
17
class UsergroupRelSession
18
{
19
    /**
20
     * @ORM\Column(name="id", type="integer")
21
     * @ORM\Id
22
     * @ORM\GeneratedValue
23
     */
24
    protected int $id;
25
26
    /**
27
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Usergroup", inversedBy="sessions")
28
     * @ORM\JoinColumn(name="usergroup_id", referencedColumnName="id", onDelete="CASCADE")
29
     */
30
    protected Usergroup $usergroup;
31
32
    /**
33
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Session")
34
     * @ORM\JoinColumn(name="session_id", referencedColumnName="id", onDelete="CASCADE")
35
     */
36
    protected Session $session;
37
38
    /**
39
     * Get id.
40
     *
41
     * @return int
42
     */
43
    public function getId()
44
    {
45
        return $this->id;
46
    }
47
48
    public function getUsergroup(): Usergroup
49
    {
50
        return $this->usergroup;
51
    }
52
53
    public function setUsergroup(Usergroup $usergroup): self
54
    {
55
        $this->usergroup = $usergroup;
56
57
        return $this;
58
    }
59
60
    public function getSession(): Session
61
    {
62
        return $this->session;
63
    }
64
65
    public function setSession(Session $session): self
66
    {
67
        $this->session = $session;
68
69
        return $this;
70
    }
71
}
72