Note   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 20
dl 0
loc 64
ccs 24
cts 24
cp 1
c 1
b 0
f 0
rs 10
wmc 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A updateName() 0 5 1
A getDescription() 0 3 1
A getCreatedAt() 0 3 1
A toJson() 0 3 1
A getName() 0 3 1
A updateCreatedAt() 0 5 1
A getId() 0 3 1
A updateUpdatedAt() 0 5 1
A getUpdatedAt() 0 3 1
A updateDescription() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Entity;
6
7
final class Note
8
{
9
    private int $id;
10
    private string $name;
11
    private ?string $description;
12
    private $createdAt;
13
    private $updatedAt;
14
15 3
    public function getId(): int
16
    {
17 3
        return $this->id;
18
    }
19
20 3
    public function getName(): string
21
    {
22 3
        return $this->name;
23
    }
24
25 2
    public function updateName(string $name): self
26
    {
27 2
        $this->name = $name;
28
29 2
        return $this;
30
    }
31
32 3
    public function getDescription(): ?string
33
    {
34 3
        return $this->description;
35
    }
36
37 2
    public function updateDescription(?string $description): self
38
    {
39 2
        $this->description = $description;
40
41 2
        return $this;
42
    }
43
44 1
    public function getCreatedAt(): ?string
45
    {
46 1
        return $this->createdAt;
47
    }
48
49 1
    public function updateCreatedAt(?string $createdAt): self
50
    {
51 1
        $this->createdAt = $createdAt;
52
53 1
        return $this;
54
    }
55
56 2
    public function getUpdatedAt(): ?string
57
    {
58 2
        return $this->updatedAt;
59
    }
60
61 2
    public function updateUpdatedAt(?string $updatedAt): self
62
    {
63 2
        $this->updatedAt = $updatedAt;
64
65 2
        return $this;
66
    }
67
68 3
    public function toJson(): object
69
    {
70 3
        return json_decode((string) json_encode(get_object_vars($this)), false);
71
    }
72
}
73