TimestampableTrait::setUpdatedAt()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
namespace PiedWeb\CMSBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
trait TimestampableTrait
8
{
9
    /**
10
     * @var \DateTimeInterface
11
     * @ORM\Column(type="datetime")
12
     */
13
    protected $createdAt;
14
15
    /**
16
     * @var \DateTimeInterface
17
     * @ORM\Column(type="datetime")
18
     */
19
    protected $updatedAt;
20
21
    /**
22
     * Sets createdAt.
23
     *
24
     * @return $this
25
     */
26
    public function setCreatedAt(\DateTime $createdAt)
27
    {
28
        $this->createdAt = $createdAt;
29
30
        return $this;
31
    }
32
33
    /**
34
     * Returns createdAt.
35
     *
36
     * @return \DateTime
37
     */
38
    public function getCreatedAt()
39
    {
40
        return $this->createdAt;
41
    }
42
43
    /**
44
     * Sets updatedAt.
45
     *
46
     * @return $this
47
     */
48
    public function setUpdatedAt(\DateTime $updatedAt)
49
    {
50
        $this->updatedAt = $updatedAt;
51
52
        return $this;
53
    }
54
55
    /**
56
     * Returns updatedAt.
57
     *
58
     * @return \DateTime
59
     */
60
    public function getUpdatedAt()
61
    {
62
        return $this->updatedAt;
63
    }
64
}
65