Passed
Push — master ( 732152...809fdb )
by Florian
03:32
created

Answer   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 71
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 6
eloc 11
dl 0
loc 71
c 0
b 0
f 0
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setParticipant() 0 3 1
A setQuestionNumber() 0 3 1
A getQuestionNumber() 0 3 1
A getValue() 0 3 1
A setValue() 0 3 1
A getParticipant() 0 3 1
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 $questionNumber;
34
35
    /**
36
     * @var string
37
     *
38
     * @ORM\Column(type="text")
39
     */
40
    private $value;
41
42
    /**
43
     * @var Participant
44
     *
45
     * @ORM\ManyToOne(targetEntity="App\Entity\Participant", inversedBy="answers")
46
     */
47
    private $participant;
48
49
    /**
50
     * @return int
51
     */
52
    public function getQuestionNumber(): int
53
    {
54
        return $this->questionNumber;
55
    }
56
57
    /**
58
     * @param int $questionNumber
59
     */
60
    public function setQuestionNumber(int $questionNumber): void
61
    {
62
        $this->questionNumber = $questionNumber;
63
    }
64
65
    /**
66
     * @return string
67
     */
68
    public function getValue(): string
69
    {
70
        return $this->value;
71
    }
72
73
    /**
74
     * @param string $value
75
     */
76
    public function setValue(string $value): void
77
    {
78
        $this->value = $value;
79
    }
80
81
    /**
82
     * @return Participant
83
     */
84
    public function getParticipant(): Participant
85
    {
86
        return $this->participant;
87
    }
88
89
    /**
90
     * @param Participant $participant
91
     */
92
    public function setParticipant(Participant $participant): void
93
    {
94
        $this->participant = $participant;
95
    }
96
}
97