CategoryView::getId()   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
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Infrastructure\Category\Query\Projections;
6
7
class CategoryView
8
{
9
    /**
10
     * @var string
11
     */
12
    private $id;
13
    /**
14
     * @var string
15
     */
16
    private $name;
17
18
    /**
19
     * CategoryView constructor.
20
     *
21
     * @param string $id
22
     * @param string $name
23
     */
24
    public function __construct(string $id, string $name)
25
    {
26
        $this->id = $id;
27
        $this->name = $name;
28
    }
29
30
    public function getId(): string
31
    {
32
        return $this->id;
33
    }
34
35
    public function getName(): string
36
    {
37
        return $this->name;
38
    }
39
40
    public function changeName(string $name)
41
    {
42
        $this->name = $name;
43
    }
44
}
45