Test Failed
Push — master ( 0bbeee...5fd70b )
by Hirofumi
02:10
created

AbandonedJobMessage   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 41
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A id() 0 4 1
1
<?php
2
3
namespace Shippinno\Job\Domain\Model;
4
5
use DateTimeImmutable;
6
7
class AbandonedJobMessage
8
{
9
    /**
10
     * @var int|null
11
     */
12
    protected $id;
13
14
    /**
15
     * @var string
16
     */
17
    private $message;
18
19
    /**
20
     * @var string
21
     */
22
    private $reason;
23
24
    /**
25
     * @var DateTimeImmutable
26
     */
27
    private $abandonedAt;
28
29
    /**
30
     * @param string $message
31
     * @param string $reason
32
     */
33
    public function __construct(string $message, string $reason)
34
    {
35
        $this->message = $message;
36
        $this->reason = $reason;
37
        $this->abandonedAt = new DateTimeImmutable;
38
    }
39
40
    /**
41
     * @return int|null
42
     */
43
    public function id(): ?int
44
    {
45
        return $this->id;
46
    }
47
}
48