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

AbstractEntity::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 1
Metric Value
c 3
b 0
f 1
dl 0
loc 5
rs 9.4286
cc 1
eloc 3
nc 1
nop 0
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