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

StoredJob   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 58
rs 10
c 0
b 0
f 0
ccs 7
cts 7
cp 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A id() 0 4 1
A name() 0 4 1
A body() 0 4 1
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