TimestampableTrait::getCreatedAt()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * (c) Soeren Martius
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace SoerenMartius\Component\Wishlist\Model;
11
12
/**
13
 * @author Soeren Martius <[email protected]>
14
 */
15
trait TimestampableTrait
16
{
17
    /**
18
     * @var \DateTime
19
     */
20
    protected $createdAt;
21
22
    /**
23
     * @var \DateTime
24
     */
25
    protected $updatedAt;
26
27
    /**
28
     * @return \DateTime
29
     */
30
    public function getCreatedAt()
31
    {
32
        return $this->createdAt;
33
    }
34
35
    /**
36
     * @return \DateTime
37
     */
38
    public function getUpdatedAt()
39
    {
40
        return $this->updatedAt;
41
    }
42
43
    /**
44
     * @param \DateTime $createdAt
45
     *
46
     * @return $this
47
     */
48
    public function setCreatedAt(\DateTime $createdAt)
49
    {
50
        $this->createdAt = $createdAt;
51
52
        return $this;
53
    }
54
55
    /**
56
     * @param \DateTime $updatedAt
57
     *
58
     * @return $this
59
     */
60
    public function setUpdatedAt(\DateTime $updatedAt)
61
    {
62
        $this->updatedAt = $updatedAt;
63
64
        return $this;
65
    }
66
}
67