UpdateCategoryCommand   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 52
ccs 11
cts 11
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 3 1
A __construct() 0 8 1
A getName() 0 3 1
A getDescription() 0 3 1
1
<?php
2
3
namespace App\Command;
4
5
use Ramsey\Uuid\UuidInterface;
6
7
class UpdateCategoryCommand implements CommandInterface
8
{
9
    /**
10
     * @var UuidInterface
11
     */
12
    private $id;
13
    /**
14
     * @var string
15
     */
16
    private $name;
17
    /**
18
     * @var ?string
19
     */
20
    private $description;
21
22
    /**
23
     * @param UuidInterface $id
24
     * @param string $name
25
     * @param ?string $description
26
     */
27 2
    public function __construct(UuidInterface $id,
28
                                string $name,
29
                                ?string $description
30
                                )
31
    {
32 2
        $this->id = $id;
33 2
        $this->name = $name;
34 2
        $this->description = $description;
35 2
    }
36
37
    /**
38
     * @return UuidInterface
39
     */
40 2
    public function getId(): UuidInterface
41
    {
42 2
        return $this->id;
43
    }
44
45
    /**
46
     * @return string
47
     */
48 2
    public function getName(): string
49
    {
50 2
        return $this->name;
51
    }
52
53
    /**
54
     * @return ?string
55
     */
56 2
    public function getDescription(): ?string
57
    {
58 2
        return $this->description;
59
    }
60
}
61