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

CSurveyAnswer::getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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