Passed
Push — master ( 803221...e6765d )
by Florian
03:53
created

Answer::getQuestionIndex()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the feedback project.
5
 *
6
 * (c) Florian Moser <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace App\Entity;
13
14
use App\Entity\Base\BaseEntity;
15
use App\Entity\Traits\IdTrait;
16
use Doctrine\ORM\Mapping as ORM;
17
18
/**
19
 * an answer determines a single feedback.
20
 *
21
 * @ORM\Entity()
22
 * @ORM\HasLifecycleCallbacks
23
 */
24
class Answer extends BaseEntity
25
{
26
    use IdTrait;
27
28
    /**
29
     * @var int
30
     *
31
     * @ORM\Column(type="integer")
32
     */
33
    private $questionIndex;
34
35
    /**
36
     * @var string
37
     *
38
     * @ORM\Column(type="text")
39
     */
40
    private $value;
41
42
    /**
43
     * @var bool
44
     *
45
     * @ORM\Column(type="boolean")
46
     */
47
    private $private;
48
49
    /**
50
     * @var Participant
51
     *
52
     * @ORM\ManyToOne(targetEntity="App\Entity\Participant", inversedBy="answers")
53
     */
54
    private $participant;
55
56
    /**
57
     * @return int
58
     */
59
    public function getQuestionIndex(): int
60
    {
61
        return $this->questionIndex;
62
    }
63
64
    /**
65
     * @param int $questionIndex
66
     */
67
    public function setQuestionIndex(int $questionIndex): void
68
    {
69
        $this->questionIndex = $questionIndex;
70
    }
71
72
    /**
73
     * @return string
74
     */
75
    public function getValue(): string
76
    {
77
        return $this->value;
78
    }
79
80
    /**
81
     * @param string $value
82
     */
83
    public function setValue(string $value): void
84
    {
85
        $this->value = $value;
86
    }
87
88
    /**
89
     * @return Participant
90
     */
91
    public function getParticipant(): Participant
92
    {
93
        return $this->participant;
94
    }
95
96
    /**
97
     * @param Participant $participant
98
     */
99
    public function setParticipant(Participant $participant): void
100
    {
101
        $this->participant = $participant;
102
    }
103
104
    /**
105
     * @return bool
106
     */
107
    public function isPrivate(): bool
108
    {
109
        return $this->private;
110
    }
111
112
    /**
113
     * @param bool $private
114
     */
115
    public function setPrivate(bool $private): void
116
    {
117
        $this->private = $private;
118
    }
119
}
120