Completed
Push — master ( 810e98...a03780 )
by Rafael
16:20
created

AbstractEntity   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
namespace Mero\BaseBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * Common entity class.
9
 *
10
 * @author Rafael Mello <[email protected]>
11
 *
12
 * @ORM\MappedSuperclass
13
 * @ORM\HasLifecycleCallbacks
14
 */
15
abstract class AbstractEntity
16
{
17
    use Field\IdTrait, Field\CreatedTrait, Field\ModifiedTrait;
18
19
    public function __construct()
20
    {
21
        $this->created = new \DateTime('now');
22
        $this->modified = new \DateTime('now');
23
    }
24
}
25