Passed
Push — master ( 4ac216...0744db )
by Christopher
08:31 queued 04:44
created

Migration::getCreatedAt()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace Triadev\EsMigration\Models;
3
4
class Migration
5
{
6
    /** @var int */
7
    private $id;
8
    
9
    /** @var string */
10
    private $migration;
11
    
12
    /** @var int */
13
    private $status;
14
    
15
    /** @var string|null */
16
    private $error;
17
    
18
    /** @var \DateTime */
19
    private $createdAt;
20
    
21
    /** @var \DateTime */
22
    private $updatedAt;
23
    
24
    /**
25
     * Migration constructor.
26
     * @param int $id
27
     * @param string $migration
28
     * @param int $status
29
     * @param null|string $error
30
     * @param \DateTime $createdAt
31
     * @param \DateTime $updatedAt
32
     */
33
    public function __construct(
34
        int $id,
35
        string $migration,
36
        int $status,
37
        ?string $error,
38
        \DateTime $createdAt,
39
        \DateTime $updatedAt
40
    ) {
41
        $this->id = $id;
42
        $this->migration = $migration;
43
        $this->status = $status;
44
        $this->error = $error;
45
        $this->createdAt = $createdAt;
46
        $this->updatedAt = $updatedAt;
47
    }
48
    
49
    /**
50
     * @return int
51
     */
52
    public function getId(): int
53
    {
54
        return $this->id;
55
    }
56
    
57
    /**
58
     * @return string
59
     */
60
    public function getMigration(): string
61
    {
62
        return $this->migration;
63
    }
64
    
65
    /**
66
     * @return int
67
     */
68
    public function getStatus(): int
69
    {
70
        return $this->status;
71
    }
72
    
73
    /**
74
     * @return null|string
75
     */
76
    public function getError(): ?string
77
    {
78
        return $this->error;
79
    }
80
    
81
    /**
82
     * @return \DateTime
83
     */
84
    public function getCreatedAt(): \DateTime
85
    {
86
        return $this->createdAt;
87
    }
88
    
89
    /**
90
     * @return \DateTime
91
     */
92
    public function getUpdatedAt(): \DateTime
93
    {
94
        return $this->updatedAt;
95
    }
96
}
97