Media   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 3
1
<?php
2
3
namespace PiedWeb\CMSBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
7
use Vich\UploaderBundle\Mapping\Annotation as Vich;
8
9
/**
10
 * @ORM\MappedSuperclass
11
 * @Vich\Uploadable
12
 * @ORM\HasLifecycleCallbacks
13
 * UniqueEntity({"name"}, message="Ce nom existe déjà.")
14
 */
15
class Media implements MediaInterface
16
{
17
    use IdTrait;
18
    use MediaTrait;
0 ignored issues
show
Bug introduced by
The trait PiedWeb\CMSBundle\Entity\MediaTrait requires the property $previousMimeType which is not provided by PiedWeb\CMSBundle\Entity\Media.
Loading history...
19
20 3
    public function __construct()
21
    {
22 3
        $this->updatedAt = null !== $this->updatedAt ? $this->updatedAt : new \DateTime();
23 3
        $this->createdAt = null !== $this->createdAt ? $this->createdAt : new \DateTime();
24 3
    }
25
}
26