Passed
Push — master ( 3ad0be...6ad90b )
by Julito
07:30
created

CSurveyAnswer   A

Complexity

Total Complexity 12

Size/Duplication

Total Lines 113
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 23
dl 0
loc 113
rs 10
c 0
b 0
f 0
wmc 12

12 Methods

Rating   Name   Duplication   Size   Complexity  
A getSurvey() 0 3 1
A setQuestion() 0 5 1
A setUser() 0 5 1
A setValue() 0 5 1
A getValue() 0 3 1
A getIid() 0 3 1
A getOptionId() 0 3 1
A getQuestion() 0 3 1
A __construct() 0 2 1
A setOptionId() 0 5 1
A setSurvey() 0 5 1
A getUser() 0 3 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
 * CSurveyAnswer.
13
 *
14
 * @ORM\Table(
15
 *     name="c_survey_answer",
16
 *     indexes={
17
 *     }
18
 * )
19
 * @ORM\Entity
20
 */
21
class CSurveyAnswer
22
{
23
    /**
24
     * @ORM\Column(name="iid", type="integer")
25
     * @ORM\Id
26
     * @ORM\GeneratedValue
27
     */
28
    protected int $iid;
29
30
    /**
31
     * @ORM\ManyToOne(targetEntity="CSurvey")
32
     * @ORM\JoinColumn(name="survey_id", referencedColumnName="iid")
33
     */
34
    protected CSurvey $survey;
35
36
    /**
37
     * @ORM\ManyToOne(targetEntity="CSurveyQuestion", inversedBy="answers")
38
     * @ORM\JoinColumn(name="question_id", referencedColumnName="iid")
39
     */
40
    protected CSurveyQuestion $question;
41
42
    /**
43
     * @ORM\Column(name="option_id", type="text", nullable=false)
44
     */
45
    protected string $optionId;
46
47
    /**
48
     * @ORM\Column(name="value", type="integer", nullable=false)
49
     */
50
    protected int $value;
51
52
    /**
53
     * @ORM\Column(name="user", type="string", length=250, nullable=false)
54
     */
55
    protected string $user;
56
57
    public function __construct()
58
    {
59
    }
60
61
    public function getIid(): int
62
    {
63
        return $this->iid;
64
    }
65
66
    public function setValue(int $value): self
67
    {
68
        $this->value = $value;
69
70
        return $this;
71
    }
72
73
    /**
74
     * Get value.
75
     *
76
     * @return int
77
     */
78
    public function getValue()
79
    {
80
        return $this->value;
81
    }
82
83
    public function getSurvey(): CSurvey
84
    {
85
        return $this->survey;
86
    }
87
88
    public function setSurvey(CSurvey $survey): self
89
    {
90
        $this->survey = $survey;
91
92
        return $this;
93
    }
94
95
    public function getQuestion(): CSurveyQuestion
96
    {
97
        return $this->question;
98
    }
99
100
    public function setQuestion(CSurveyQuestion $question): self
101
    {
102
        $this->question = $question;
103
104
        return $this;
105
    }
106
107
    public function setUser(string $user): self
108
    {
109
        $this->user = $user;
110
111
        return $this;
112
    }
113
114
    /**
115
     * Get user.
116
     *
117
     * @return string
118
     */
119
    public function getUser()
120
    {
121
        return $this->user;
122
    }
123
124
    public function getOptionId(): string
125
    {
126
        return $this->optionId;
127
    }
128
129
    public function setOptionId(string $optionId): self
130
    {
131
        $this->optionId = $optionId;
132
133
        return $this;
134
    }
135
}
136