Test Setup Failed
Push — master ( a8f38f...93c046 )
by Fernando
07:40
created

Task   A

Complexity

Total Complexity 14

Size/Duplication

Total Lines 90
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 28
dl 0
loc 90
ccs 34
cts 34
cp 1
c 1
b 0
f 0
rs 10
wmc 14

14 Methods

Rating   Name   Duplication   Size   Complexity  
A getUpdatedAt() 0 3 1
A getId() 0 3 1
A updateDescription() 0 5 1
A getStatus() 0 3 1
A updateUpdatedAt() 0 5 1
A updateCreatedAt() 0 5 1
A getCreatedAt() 0 3 1
A getUserId() 0 3 1
A getDescription() 0 3 1
A getName() 0 3 1
A updateStatus() 0 5 1
A updateUserId() 0 5 1
A toJson() 0 3 1
A updateName() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Entity;
6
7
final class Task
8
{
9
    private int $id;
10
    private string $name;
11
    private ?string $description;
12
    private int $status;
13
    private int $userId;
14
    private $createdAt;
15
    private $updatedAt;
16
17 2
    public function getId(): int
18
    {
19 2
        return $this->id;
20
    }
21
22 2
    public function getName(): string
23
    {
24 2
        return $this->name;
25
    }
26
27 3
    public function updateName(string $name): self
28
    {
29 3
        $this->name = $name;
30
31 3
        return $this;
32
    }
33
34 2
    public function getDescription(): ?string
35
    {
36 2
        return $this->description;
37
    }
38
39 3
    public function updateDescription(?string $description): self
40
    {
41 3
        $this->description = $description;
42
43 3
        return $this;
44
    }
45
46 2
    public function getStatus(): ?int
47
    {
48 2
        return $this->status;
49
    }
50
51 2
    public function updateStatus(?int $status): self
52
    {
53 2
        $this->status = $status;
54
55 2
        return $this;
56
    }
57
58 2
    public function getUserId(): ?int
59
    {
60 2
        return $this->userId;
61
    }
62
63 2
    public function updateUserId(?int $userId): self
64
    {
65 2
        $this->userId = $userId;
66
67 2
        return $this;
68
    }
69
70 1
    public function getCreatedAt(): ?string
71
    {
72 1
        return $this->createdAt;
73
    }
74
75 1
    public function updateCreatedAt(?string $createdAt): self
76
    {
77 1
        $this->createdAt = $createdAt;
78
79 1
        return $this;
80
    }
81
82 1
    public function getUpdatedAt(): ?string
83
    {
84 1
        return $this->updatedAt;
85
    }
86
87 1
    public function updateUpdatedAt(?string $updatedAt): self
88
    {
89 1
        $this->updatedAt = $updatedAt;
90
91 1
        return $this;
92
    }
93
94 2
    public function toJson(): object
95
    {
96 2
        return json_decode((string) json_encode(get_object_vars($this)), false);
97
    }
98
}
99