Answer::setPrivate()   A
last analyzed

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 1
1
<?php
2
3
/*
4
 * This file is part of the thealternativezurich/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
    public function getQuestionIndex(): int
57
    {
58
        return $this->questionIndex;
59
    }
60
61
    public function setQuestionIndex(int $questionIndex): void
62
    {
63
        $this->questionIndex = $questionIndex;
64
    }
65
66
    public function getValue(): string
67
    {
68
        return $this->value;
69
    }
70
71
    public function setValue(string $value): void
72
    {
73
        $this->value = $value;
74
    }
75
76
    public function getParticipant(): Participant
77
    {
78
        return $this->participant;
79
    }
80
81
    public function setParticipant(Participant $participant): void
82
    {
83
        $this->participant = $participant;
84
    }
85
86
    public function isPrivate(): bool
87
    {
88
        return $this->private;
89
    }
90
91
    public function setPrivate(bool $private): void
92
    {
93
        $this->private = $private;
94
    }
95
}
96