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

Category::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 6
rs 9.4285
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 Category
9
{
10
    /**
11
     * @var UuidInterface
12
     */
13
    private $id;
14
15
    /**
16
     * @var NotEmptyString
17
     */
18
    private $name;
19
20
    /**
21
     * @param UuidInterface $id
22
     * @param NotEmptyString $name
23
     */
24
    public function __construct(
25
        UuidInterface $id,
26
        NotEmptyString $name
27
    ) {
28
        $this->id = $id;
29
        $this->name = $name;
30
    }
31
32
    /**
33
     * @return UuidInterface
34
     */
35
    public function getId(): UuidInterface
36
    {
37
        return $this->id;
38
    }
39
40
    /**
41
     * @return NotEmptyString
42
     */
43
    public function getName(): NotEmptyString
44
    {
45
        return $this->name;
46
    }
47
}
48