CategoryView   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 36
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 3 1
A changeName() 0 3 1
A __construct() 0 4 1
A getId() 0 3 1
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