TimestampableTrait   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 56
ccs 0
cts 10
cp 0
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCreatedAt() 0 3 1
A setCreatedAt() 0 5 1
A setUpdatedAt() 0 5 1
A getUpdatedAt() 0 3 1
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