Completed
Pull Request — master (#1)
by Luc
06:09 queued 03:02
created

Answer::getText()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace VSV\GVQ_API\Question\Models;
4
5
use Ramsey\Uuid\UuidInterface;
6
use VSV\GVQ_API\Question\ValueObjects\NotEmptyString;
7
8
class Answer
9
{
10
    /**
11
     * @var UuidInterface
12
     */
13
    private $id;
14
15
    /**
16
     * @var NotEmptyString
17
     */
18
    private $text;
19
20
    /**
21
     * @var bool
22
     */
23
    private $correct;
24
25
    /**
26
     * @param UuidInterface $id
27
     * @param NotEmptyString $text
28
     * @param bool $correct
29
     */
30
    public function __construct(
31
        UuidInterface $id,
32
        NotEmptyString $text,
33
        bool $correct
34
    ) {
35
        $this->id = $id;
36
        $this->text = $text;
37
        $this->correct = $correct;
38
    }
39
40
    /**
41
     * @return UuidInterface
42
     */
43
    public function getId(): UuidInterface
44
    {
45
        return $this->id;
46
    }
47
48
    /**
49
     * @return NotEmptyString
50
     */
51
    public function getText(): NotEmptyString
52
    {
53
        return $this->text;
54
    }
55
56
    /**
57
     * @return bool
58
     */
59
    public function isCorrect(): bool
60
    {
61
        return $this->correct;
62
    }
63
}
64