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

Task::getData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 10
CRAP Score 1

Importance

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