TimestampableTrait   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 4
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 44
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCreatedAt() 0 4 1
A getUpdatedAt() 0 4 1
A setCreatedAt() 0 4 1
A setUpdatedAt() 0 4 1
1
<?php
2
3
namespace DoS\ResourceBundle\Model;
4
5
trait TimestampableTrait
6
{
7
    /**
8
     * @var \DateTime
9
     */
10
    protected $createdAt;
11
12
    /**
13
     * @var \DateTime
14
     */
15
    protected $updatedAt;
16
17
    /**
18
     * {@inheritdoc}
19
     */
20
    public function getCreatedAt()
21
    {
22
        return $this->createdAt;
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function getUpdatedAt()
29
    {
30
        return $this->updatedAt;
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public function setCreatedAt(\DateTime $createdAt)
37
    {
38
        $this->createdAt = $createdAt;
39
    }
40
41
    /**
42
     * {@inheritdoc}
43
     */
44
    public function setUpdatedAt(\DateTime $updatedAt)
45
    {
46
        $this->updatedAt = $updatedAt;
47
    }
48
}
49