Test Failed
Branch master (cd46ea)
by Hirofumi
02:16
created

StoredJob::name()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 0
cts 0
cp 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Shippinno\Job\Domain\Model;
4
5
use DateTimeImmutable;
6
7
class StoredJob
8
{
9
    /**
10
     * @var int|null
11
     */
12
    protected $id;
13
14
    /**
15
     * @var string
16
     */
17
    private $name;
18
19
    /**
20
     * @var string
21
     */
22
    private $body;
23
24
    /**
25
     * @var DateTimeImmutable
26
     */
27
    private $createdAt;
28
29
    /**
30
     * @param string $name
31
     * @param string $body
32
     * @param DateTimeImmutable $createdAt
33
     */
34 7
    public function __construct(string $name, string $body, DateTimeImmutable $createdAt)
35
    {
36 7
        $this->name = $name;
37 7
        $this->body = $body;
38 7
        $this->createdAt = $createdAt;
39 7
    }
40
41
    /**
42
     * @return int|null
43
     */
44 4
    public function id(): ?int
45
    {
46 4
        return $this->id;
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    public function name(): string
53
    {
54
        return $this->name;
55
    }
56
57
    /**
58
     * @return string
59
     */
60
    public function body(): string
61
    {
62
        return $this->body;
63
    }
64
}
65