Passed
Pull Request — develop (#8)
by BENARD
02:59
created

DateTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 14
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDate() 0 3 1
A setDate() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VideoGamesRecords\DwhBundle\Traits\Entity;
6
7
use DateTime;
8
use Doctrine\ORM\Mapping as ORM;
9
10
trait DateTrait
11
{
12
    #[ORM\Id]
13
    #[ORM\Column(type: 'date', nullable: false)]
14
    private DateTime $date;
15
16
    public function getDate(): DateTime
17
    {
18
        return $this->date;
19
    }
20
21
    public function setDate(DateTime $date): void
22
    {
23
        $this->date = $date;
24
    }
25
}
26