Participant::getIdentifier()   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 0
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\Common\Collections\ArrayCollection;
17
use Doctrine\ORM\Mapping as ORM;
18
19
/**
20
 * a participant answers the questions.
21
 *
22
 * @ORM\Entity()
23
 * @ORM\HasLifecycleCallbacks
24
 */
25
class Participant extends BaseEntity
26
{
27
    use IdTrait;
28
29
    /**
30
     * @var string
31
     *
32
     * @ORM\Column(type="text")
33
     */
34
    private $identifier;
35
36
    /**
37
     * @var int|null
38
     *
39
     * @ORM\Column(type="integer", nullable=true)
40
     */
41
    private $timeNeededInSeconds;
42
43
    /**
44
     * @var Answer[]|ArrayCollection
45
     *
46
     * @ORM\OneToMany(targetEntity="Answer", mappedBy="participant")
47
     */
48
    private $answers;
49
50
    /**
51
     * @var Event
52
     *
53
     * @ORM\ManyToOne(targetEntity="App\Entity\Event", inversedBy="participants")
54
     */
55
    private $event;
56
57
    /**
58
     * Participant constructor.
59
     */
60
    public function __construct()
61
    {
62
        $this->answers = new ArrayCollection();
63
    }
64
65
    /**
66
     * @return Answer[]|ArrayCollection
67
     */
68
    public function getAnswers()
69
    {
70
        return $this->answers;
71
    }
72
73
    public function getEvent(): Event
74
    {
75
        return $this->event;
76
    }
77
78
    public function setEvent(Event $event): void
79
    {
80
        $this->event = $event;
81
    }
82
83
    public function getTimeNeededInSeconds(): ?int
84
    {
85
        return $this->timeNeededInSeconds;
86
    }
87
88
    public function setTimeNeededInSeconds(?int $timeNeededInSeconds): void
89
    {
90
        $this->timeNeededInSeconds = $timeNeededInSeconds;
91
    }
92
93
    public function getIdentifier(): string
94
    {
95
        return $this->identifier;
96
    }
97
98
    public function setIdentifier(string $identifier): void
99
    {
100
        $this->identifier = $identifier;
101
    }
102
}
103