Passed
Push — master ( 8d1f02...5a0940 )
by Julito
07:38
created

CSurveyQuestionOption::setOptionText()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
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
 * CSurveyQuestionOption.
13
 *
14
 * @ORM\Table(
15
 *  name="c_survey_question_option",
16
 *  indexes={
17
 *     @ORM\Index(name="course", columns={"c_id"}),
18
 *     @ORM\Index(name="idx_survey_qo_qid", columns={"question_id"})
19
 *  }
20
 * )
21
 * @ORM\Entity
22
 */
23
class CSurveyQuestionOption
24
{
25
    /**
26
     * @ORM\Column(name="iid", type="integer")
27
     * @ORM\Id
28
     * @ORM\GeneratedValue
29
     */
30
    protected int $iid;
31
32
    /**
33
     * @ORM\Column(name="c_id", type="integer")
34
     */
35
    protected int $cId;
36
37
    /**
38
     * @ORM\ManyToOne(targetEntity="CSurveyQuestion")
39
     * @ORM\JoinColumn(name="question_id", referencedColumnName="iid")
40
     */
41
    protected CSurveyQuestion $question;
42
43
    /**
44
     * @ORM\ManyToOne(targetEntity="CSurvey")
45
     * @ORM\JoinColumn(name="survey_id", referencedColumnName="iid")
46
     */
47
    protected CSurvey $survey;
48
49
    /**
50
     * @ORM\Column(name="option_text", type="text", nullable=false)
51
     */
52
    protected string $optionText;
53
54
    /**
55
     * @ORM\Column(name="sort", type="integer", nullable=false)
56
     */
57
    protected int $sort;
58
59
    /**
60
     * @ORM\Column(name="value", type="integer", nullable=false)
61
     */
62
    protected int $value;
63
64
    public function __construct()
65
    {
66
    }
67
68
    public function getIid(): int
69
    {
70
        return $this->iid;
71
    }
72
73
    /**
74
     * Set optionText.
75
     *
76
     * @param string $optionText
77
     *
78
     * @return CSurveyQuestionOption
79
     */
80
    public function setOptionText($optionText)
81
    {
82
        $this->optionText = $optionText;
83
84
        return $this;
85
    }
86
87
    /**
88
     * Get optionText.
89
     *
90
     * @return string
91
     */
92
    public function getOptionText()
93
    {
94
        return $this->optionText;
95
    }
96
97
    /**
98
     * Set sort.
99
     *
100
     * @param int $sort
101
     *
102
     * @return CSurveyQuestionOption
103
     */
104
    public function setSort($sort)
105
    {
106
        $this->sort = $sort;
107
108
        return $this;
109
    }
110
111
    /**
112
     * Get sort.
113
     *
114
     * @return int
115
     */
116
    public function getSort()
117
    {
118
        return $this->sort;
119
    }
120
121
    /**
122
     * Set value.
123
     *
124
     * @param int $value
125
     *
126
     * @return CSurveyQuestionOption
127
     */
128
    public function setValue($value)
129
    {
130
        $this->value = $value;
131
132
        return $this;
133
    }
134
135
    /**
136
     * Get value.
137
     *
138
     * @return int
139
     */
140
    public function getValue()
141
    {
142
        return $this->value;
143
    }
144
145
    /**
146
     * Set cId.
147
     *
148
     * @param int $cId
149
     *
150
     * @return CSurveyQuestionOption
151
     */
152
    public function setCId($cId)
153
    {
154
        $this->cId = $cId;
155
156
        return $this;
157
    }
158
159
    /**
160
     * Get cId.
161
     *
162
     * @return int
163
     */
164
    public function getCId()
165
    {
166
        return $this->cId;
167
    }
168
169
    public function getQuestion(): CSurveyQuestion
170
    {
171
        return $this->question;
172
    }
173
174
    public function setQuestion(CSurveyQuestion $question): self
175
    {
176
        $this->question = $question;
177
178
        return $this;
179
    }
180
181
    public function getSurvey(): CSurvey
182
    {
183
        return $this->survey;
184
    }
185
186
    public function setSurvey(CSurvey $survey): self
187
    {
188
        $this->survey = $survey;
189
190
        return $this;
191
    }
192
}
193