Passed
Push — preprodparkur ( f4828c...eec125 )
by Angel Fernando Quiroz
13:34
created

AgendaEventInvitee::getUser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CoreBundle\Entity;
6
7
use Chamilo\CoreBundle\Traits\TimestampableTypedEntity;
8
use Chamilo\UserBundle\Entity\User;
9
use Doctrine\ORM\Mapping as ORM;
10
11
/**
12
 * @ORM\Table(name="agenda_event_invitee")
13
 * Add @ to the next lineactivating the agenda_collective_invitations configuration setting.
14
 * ORM\Entity()
15
 */
16
class AgendaEventInvitee
17
{
18
    use TimestampableTypedEntity;
19
20
    /**
21
     * @var int
22
     *
23
     * @ORM\Id()
24
     * @ORM\Column(type="bigint")
25
     * @ORM\GeneratedValue
26
     */
27
    protected $id;
28
29
    /**
30
     * @var AgendaEventInvitation|null
31
     *
32
     * @ORM\ManyToOne(targetEntity="AgendaEventInvitation", inversedBy="invitees")
33
     * @ORM\JoinColumn(name="invitation_id", referencedColumnName="id", onDelete="CASCADE")
34
     */
35
    protected $invitation;
36
37
    /**
38
     * @var User|null
39
     *
40
     * @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User")
41
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=true, onDelete="SET NULL")
42
     */
43
    protected $user;
44
45
    public function getId(): int
46
    {
47
        return $this->id;
48
    }
49
50
    public function getInvitation(): ?AgendaEventInvitation
51
    {
52
        return $this->invitation;
53
    }
54
55
    public function setInvitation(?AgendaEventInvitation $invitation): AgendaEventInvitee
56
    {
57
        $this->invitation = $invitation;
58
59
        return $this;
60
    }
61
62
    public function getUser(): ?User
63
    {
64
        return $this->user;
65
    }
66
67
    public function setUser(?User $user): AgendaEventInvitee
68
    {
69
        $this->user = $user;
70
71
        return $this;
72
    }
73
}
74