Completed
Push — master ( f75b34...c65fe1 )
by Julito
11:42
created

CQuizQuestionRelCategory::setCategoryId()   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
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CourseBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
9
/**
10
 * CQuizQuestionRelCategory.
11
 *
12
 * @ORM\Table(name="c_quiz_question_rel_category")
13
 * @ORM\Entity
14
 */
15
class CQuizQuestionRelCategory
16
{
17
    /**
18
     * @var int
19
     *
20
     * @ORM\Column(name="iid", type="integer")
21
     * @ORM\Id
22
     * @ORM\GeneratedValue
23
     */
24
    protected $iid;
25
26
    /**
27
     * @var CQuizQuestion $question
28
     *
29
     * @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CQuizQuestion", inversedBy="questionCategories")
30
     * @ORM\JoinColumn(name="question_id", referencedColumnName="iid", nullable=false)
31
     */
32
    private $question;
33
34
    /**
35
     * @var CQuizQuestionCategory $category
36
     *
37
     * @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CQuizQuestionCategory", inversedBy="questionCategories")
38
     * @ORM\JoinColumn(name="category_id", referencedColumnName="iid", nullable=false)
39
     */
40
    private $category;
41
42
    /**
43
     * @return CQuizQuestion
44
     */
45
    public function getQuestion(): self
46
    {
47
        return $this->question;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->question returns the type Chamilo\CourseBundle\Entity\CQuizQuestion which is incompatible with the type-hinted return Chamilo\CourseBundle\Ent...QuizQuestionRelCategory.
Loading history...
48
    }
49
50
    /**
51
     * @param CQuizQuestion $question
52
     *
53
     * @return CQuizQuestionRelCategory
54
     */
55
    public function setQuestion(CQuizQuestion $question): self
56
    {
57
        $this->question = $question;
58
59
        return $this;
60
    }
61
62
    /**
63
     * @return CQuizQuestionCategory
64
     */
65
    public function getCategory(): self
66
    {
67
        return $this->category;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->category returns the type Chamilo\CourseBundle\Entity\CQuizQuestionCategory which is incompatible with the type-hinted return Chamilo\CourseBundle\Ent...QuizQuestionRelCategory.
Loading history...
68
    }
69
70
    /**
71
     * @param CQuizQuestionCategory $category
72
     *
73
     * @return CQuizQuestionRelCategory
74
     */
75
    public function setCategory(CQuizQuestionCategory $category): self
76
    {
77
        $this->category = $category;
78
79
        return $this;
80
    }
81
}
82