Answer   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 70
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 8
eloc 14
dl 0
loc 70
rs 10
c 1
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A setParticipant() 0 3 1
A setPrivate() 0 3 1
A getQuestionIndex() 0 3 1
A getValue() 0 3 1
A setQuestionIndex() 0 3 1
A isPrivate() 0 3 1
A setValue() 0 3 1
A getParticipant() 0 3 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