Passed
Push — master ( 4c4023...2b0e92 )
by Julito
07:08
created

CStudentPublicationRelUser::setPublication()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 1
b 1
f 1
1
<?php
2
3
declare(strict_types=1);
4
5
/* For licensing terms, see /license.txt */
6
7
namespace Chamilo\CourseBundle\Entity;
8
9
use Chamilo\CoreBundle\Entity\User;
10
use Doctrine\ORM\Mapping as ORM;
11
12
/**
13
 * CStudentPublicationRelUser.
14
 *
15
 * @ORM\Table(
16
 *     name="c_student_publication_rel_user",
17
 *     indexes={
18
 *     }
19
 * )
20
 * @ORM\Entity
21
 */
22
class CStudentPublicationRelUser
23
{
24
    /**
25
     * @ORM\Column(name="iid", type="integer")
26
     * @ORM\Id
27
     * @ORM\GeneratedValue
28
     */
29
    protected int $iid;
30
31
    /**
32
     * @ORM\ManyToOne(targetEntity="CStudentPublication")
33
     * @ORM\JoinColumn(name="work_id", referencedColumnName="iid", onDelete="CASCADE")
34
     */
35
    protected CStudentPublication $publication;
36
37
    /**
38
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\User")
39
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
40
     */
41
    protected User $user;
42
43
    public function getPublication(): CStudentPublication
44
    {
45
        return $this->publication;
46
    }
47
48
    public function setPublication(CStudentPublication $publication): self
49
    {
50
        $this->publication = $publication;
51
52
        return $this;
53
    }
54
55
    public function getUser(): User
56
    {
57
        return $this->user;
58
    }
59
60
    public function setUser(User $user): self
61
    {
62
        $this->user = $user;
63
64
        return $this;
65
    }
66
}
67