Passed
Push — master ( 190bd7...86c511 )
by Julito
09:39
created

CSurveyQuestion::getType()   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
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CourseBundle\Entity;
5
6
use Doctrine\ORM\Mapping as ORM;
7
8
/**
9
 * CSurveyQuestion.
10
 *
11
 * @ORM\Table(
12
 *  name="c_survey_question",
13
 *  indexes={
14
 *     @ORM\Index(name="course", columns={"c_id"}),
15
 *     @ORM\Index(name="idx_survey_q_qid", columns={"question_id"})
16
 *  }
17
 * )
18
 * @ORM\Entity
19
 */
20
class CSurveyQuestion
21
{
22
    /**
23
     * @var int
24
     *
25
     * @ORM\Column(name="iid", type="integer")
26
     * @ORM\Id
27
     * @ORM\GeneratedValue
28
     */
29
    protected $iid;
30
31
    /**
32
     * @var int
33
     *
34
     * @ORM\Column(name="c_id", type="integer")
35
     */
36
    protected $cId;
37
38
    /**
39
     * @var int
40
     *
41
     * @ORM\Column(name="question_id", type="integer")
42
     */
43
    protected $questionId;
44
45
    /**
46
     * @var int
47
     *
48
     * @ORM\Column(name="survey_id", type="integer", nullable=false)
49
     */
50
    protected $surveyId;
51
52
    /**
53
     * @var string
54
     *
55
     * @ORM\Column(name="survey_question", type="text", nullable=false)
56
     */
57
    protected $surveyQuestion;
58
59
    /**
60
     * @var string
61
     *
62
     * @ORM\Column(name="survey_question_comment", type="text", nullable=false)
63
     */
64
    protected $surveyQuestionComment;
65
66
    /**
67
     * @var string
68
     *
69
     * @ORM\Column(name="type", type="string", length=250, nullable=false)
70
     */
71
    protected $type;
72
73
    /**
74
     * @var string
75
     *
76
     * @ORM\Column(name="display", type="string", length=10, nullable=false)
77
     */
78
    protected $display;
79
80
    /**
81
     * @var int
82
     *
83
     * @ORM\Column(name="sort", type="integer", nullable=false)
84
     */
85
    protected $sort;
86
87
    /**
88
     * @var int
89
     *
90
     * @ORM\Column(name="shared_question_id", type="integer", nullable=true)
91
     */
92
    protected $sharedQuestionId;
93
94
    /**
95
     * @var int
96
     *
97
     * @ORM\Column(name="max_value", type="integer", nullable=true)
98
     */
99
    protected $maxValue;
100
101
    /**
102
     * @var int
103
     *
104
     * @ORM\Column(name="survey_group_pri", type="integer", nullable=false)
105
     */
106
    protected $surveyGroupPri;
107
108
    /**
109
     * @var int
110
     *
111
     * @ORM\Column(name="survey_group_sec1", type="integer", nullable=false)
112
     */
113
    protected $surveyGroupSec1;
114
115
    /**
116
     * @var int
117
     *
118
     * @ORM\Column(name="survey_group_sec2", type="integer", nullable=false)
119
     */
120
    protected $surveyGroupSec2;
121
122
    /**
123
     * @var bool
124
     *
125
     * @ORM\Column(name="is_required", type="boolean", options={"default": false})
126
     */
127
    protected $isMandatory = false;
128
129
    /**
130
     * CSurveyQuestion constructor.
131
     */
132
    public function __construct()
133
    {
134
        $this->questionId = 0;
135
        $this->surveyGroupPri = '';
0 ignored issues
show
Documentation Bug introduced by
The property $surveyGroupPri was declared of type integer, but '' is of type string. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
136
        $this->surveyGroupSec1 = '';
0 ignored issues
show
Documentation Bug introduced by
The property $surveyGroupSec1 was declared of type integer, but '' is of type string. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
137
        $this->surveyGroupSec2 = '';
0 ignored issues
show
Documentation Bug introduced by
The property $surveyGroupSec2 was declared of type integer, but '' is of type string. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
138
    }
139
140
    /**
141
     * @return int
142
     */
143
    public function getIid(): int
144
    {
145
        return $this->iid;
146
    }
147
148
    /**
149
     * @param int $iid
150
     *
151
     * @return CSurveyQuestion
152
     */
153
    public function setIid(int $iid): CSurveyQuestion
154
    {
155
        $this->iid = $iid;
156
157
        return $this;
158
    }
159
160
    /**
161
     * Set surveyId.
162
     *
163
     * @param int $surveyId
164
     *
165
     * @return CSurveyQuestion
166
     */
167
    public function setSurveyId($surveyId)
168
    {
169
        $this->surveyId = $surveyId;
170
171
        return $this;
172
    }
173
174
    /**
175
     * Get surveyId.
176
     *
177
     * @return int
178
     */
179
    public function getSurveyId()
180
    {
181
        return $this->surveyId;
182
    }
183
184
    /**
185
     * Set surveyQuestion.
186
     *
187
     * @param string $surveyQuestion
188
     *
189
     * @return CSurveyQuestion
190
     */
191
    public function setSurveyQuestion($surveyQuestion)
192
    {
193
        $this->surveyQuestion = $surveyQuestion;
194
195
        return $this;
196
    }
197
198
    /**
199
     * Get surveyQuestion.
200
     *
201
     * @return string
202
     */
203
    public function getSurveyQuestion()
204
    {
205
        return $this->surveyQuestion;
206
    }
207
208
    /**
209
     * Set surveyQuestionComment.
210
     *
211
     * @param string $surveyQuestionComment
212
     *
213
     * @return CSurveyQuestion
214
     */
215
    public function setSurveyQuestionComment($surveyQuestionComment)
216
    {
217
        $this->surveyQuestionComment = $surveyQuestionComment;
218
219
        return $this;
220
    }
221
222
    /**
223
     * Get surveyQuestionComment.
224
     *
225
     * @return string
226
     */
227
    public function getSurveyQuestionComment()
228
    {
229
        return $this->surveyQuestionComment;
230
    }
231
232
    /**
233
     * Set type.
234
     *
235
     * @param string $type
236
     *
237
     * @return CSurveyQuestion
238
     */
239
    public function setType($type)
240
    {
241
        $this->type = $type;
242
243
        return $this;
244
    }
245
246
    /**
247
     * Get type.
248
     *
249
     * @return string
250
     */
251
    public function getType()
252
    {
253
        return $this->type;
254
    }
255
256
    /**
257
     * Set display.
258
     *
259
     * @param string $display
260
     *
261
     * @return CSurveyQuestion
262
     */
263
    public function setDisplay($display)
264
    {
265
        $this->display = $display;
266
267
        return $this;
268
    }
269
270
    /**
271
     * Get display.
272
     *
273
     * @return string
274
     */
275
    public function getDisplay()
276
    {
277
        return $this->display;
278
    }
279
280
    /**
281
     * Set sort.
282
     *
283
     * @param int $sort
284
     *
285
     * @return CSurveyQuestion
286
     */
287
    public function setSort($sort)
288
    {
289
        $this->sort = $sort;
290
291
        return $this;
292
    }
293
294
    /**
295
     * Get sort.
296
     *
297
     * @return int
298
     */
299
    public function getSort()
300
    {
301
        return $this->sort;
302
    }
303
304
    /**
305
     * Set sharedQuestionId.
306
     *
307
     * @param int $sharedQuestionId
308
     *
309
     * @return CSurveyQuestion
310
     */
311
    public function setSharedQuestionId($sharedQuestionId)
312
    {
313
        $this->sharedQuestionId = (int) $sharedQuestionId;
314
315
        return $this;
316
    }
317
318
    /**
319
     * Get sharedQuestionId.
320
     *
321
     * @return int
322
     */
323
    public function getSharedQuestionId()
324
    {
325
        return $this->sharedQuestionId;
326
    }
327
328
    /**
329
     * Set maxValue.
330
     *
331
     * @param int $maxValue
332
     *
333
     * @return CSurveyQuestion
334
     */
335
    public function setMaxValue($maxValue)
336
    {
337
        $this->maxValue = $maxValue;
338
339
        return $this;
340
    }
341
342
    /**
343
     * Get maxValue.
344
     *
345
     * @return int
346
     */
347
    public function getMaxValue()
348
    {
349
        return $this->maxValue;
350
    }
351
352
    /**
353
     * Set surveyGroupPri.
354
     *
355
     * @param int $surveyGroupPri
356
     *
357
     * @return CSurveyQuestion
358
     */
359
    public function setSurveyGroupPri($surveyGroupPri)
360
    {
361
        $this->surveyGroupPri = $surveyGroupPri;
362
363
        return $this;
364
    }
365
366
    /**
367
     * Get surveyGroupPri.
368
     *
369
     * @return int
370
     */
371
    public function getSurveyGroupPri()
372
    {
373
        return $this->surveyGroupPri;
374
    }
375
376
    /**
377
     * Set surveyGroupSec1.
378
     *
379
     * @param int $surveyGroupSec1
380
     *
381
     * @return CSurveyQuestion
382
     */
383
    public function setSurveyGroupSec1($surveyGroupSec1)
384
    {
385
        $this->surveyGroupSec1 = $surveyGroupSec1;
386
387
        return $this;
388
    }
389
390
    /**
391
     * Get surveyGroupSec1.
392
     *
393
     * @return int
394
     */
395
    public function getSurveyGroupSec1()
396
    {
397
        return $this->surveyGroupSec1;
398
    }
399
400
    /**
401
     * Set surveyGroupSec2.
402
     *
403
     * @param int $surveyGroupSec2
404
     *
405
     * @return CSurveyQuestion
406
     */
407
    public function setSurveyGroupSec2($surveyGroupSec2)
408
    {
409
        $this->surveyGroupSec2 = $surveyGroupSec2;
410
411
        return $this;
412
    }
413
414
    /**
415
     * Get surveyGroupSec2.
416
     *
417
     * @return int
418
     */
419
    public function getSurveyGroupSec2()
420
    {
421
        return $this->surveyGroupSec2;
422
    }
423
424
    /**
425
     * Set questionId.
426
     *
427
     * @param int $questionId
428
     *
429
     * @return CSurveyQuestion
430
     */
431
    public function setQuestionId($questionId)
432
    {
433
        $this->questionId = $questionId;
434
435
        return $this;
436
    }
437
438
    /**
439
     * Get questionId.
440
     *
441
     * @return int
442
     */
443
    public function getQuestionId()
444
    {
445
        return $this->questionId;
446
    }
447
448
    /**
449
     * Set cId.
450
     *
451
     * @param int $cId
452
     *
453
     * @return CSurveyQuestion
454
     */
455
    public function setCId($cId)
456
    {
457
        $this->cId = $cId;
458
459
        return $this;
460
    }
461
462
    /**
463
     * Get cId.
464
     *
465
     * @return int
466
     */
467
    public function getCId()
468
    {
469
        return $this->cId;
470
    }
471
472
    /**
473
     * Set isMandatory.
474
     *
475
     * @return bool
476
     */
477
    public function isMandatory(): bool
478
    {
479
        return $this->isMandatory;
480
    }
481
482
    /**
483
     * Get isMandatory.
484
     *
485
     * @param bool $isMandatory
486
     *
487
     * @return CSurveyQuestion
488
     */
489
    public function setIsMandatory(bool $isMandatory): CSurveyQuestion
490
    {
491
        $this->isMandatory = $isMandatory;
492
493
        return $this;
494
    }
495
}
496