AbstractEntityClassic::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Mero\Bundle\BaseBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * Common entity class with simple identifier(integer type).
9
 *
10
 * @author Rafael Mello <[email protected]>
11
 *
12
 * @ORM\MappedSuperclass
13
 * @ORM\HasLifecycleCallbacks
14
 */
15
abstract class AbstractEntityClassic
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