Passed
Push — master ( 251179...3b9d17 )
by Julito
09:58
created

CQuizRelQuestionCategory::getIid()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
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 Doctrine\ORM\Mapping as ORM;
10
11
/**
12
 * Quiz rel question categories.
13
 *
14
 * @ORM\Table(name="c_quiz_rel_category")
15
 * @ORM\Entity
16
 */
17
class CQuizRelQuestionCategory
18
{
19
    /**
20
     * @ORM\Column(name="iid", type="bigint")
21
     * @ORM\Id
22
     * @ORM\GeneratedValue
23
     */
24
    protected int $iid;
25
26
    /**
27
     * @ORM\ManyToOne(targetEntity="CQuizQuestionCategory", cascade={"persist"})
28
     * @ORM\JoinColumn(name="category_id", referencedColumnName="iid", onDelete="CASCADE")
29
     */
30
    protected CQuizQuestionCategory $category;
31
32
    /**
33
     * @ORM\ManyToOne(targetEntity="CQuiz", cascade={"persist"})
34
     * @ORM\JoinColumn(name="exercise_id", referencedColumnName="iid", onDelete="CASCADE")
35
     */
36
    protected CQuiz $quiz;
37
38
    /**
39
     * @ORM\Column(name="count_questions", type="integer", nullable=false)
40
     */
41
    protected int $countQuestions;
42
43
    /**
44
     * @return int
45
     */
46
    public function getIid()
47
    {
48
        return $this->iid;
49
    }
50
51
    public function getCategory(): CQuizQuestionCategory
52
    {
53
        return $this->category;
54
    }
55
56
    public function getQuiz(): CQuiz
57
    {
58
        return $this->quiz;
59
    }
60
61
    public function getCountQuestions(): int
62
    {
63
        return $this->countQuestions;
64
    }
65
66
    public function setCountQuestions(int $countQuestions): self
67
    {
68
        $this->countQuestions = $countQuestions;
69
70
        return $this;
71
    }
72
}
73