Note::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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