Passed
Push — develop ( 24ed6e...982d86 )
by BENARD
12:35
created

LastUpdateTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getLastUpdate() 0 3 1
A setLastUpdate() 0 5 1
1
<?php
2
3
namespace VideoGamesRecords\CoreBundle\Traits\Entity;
4
5
use DateTime;
6
7
trait LastUpdateTrait
8
{
9
    /**
10
     * @ORM\Column(name="lastUpdate", type="datetime", nullable=true)
11
     */
12
    private DateTime $lastUpdate;
13
14
15
    /**
16
     * Set lastUpdate
17
     *
18
     * @param DateTime $lastUpdate
19
     * @return $this
20
     */
21
    public function setLastUpdate(DateTime $lastUpdate): static
22
    {
23
        $this->lastUpdate = $lastUpdate;
24
25
        return $this;
26
    }
27
28
    /**
29
     * Get lastUpdate
30
     *
31
     * @return DateTime
32
     */
33
    public function getLastUpdate(): DateTime
34
    {
35
        return $this->lastUpdate;
36
    }
37
}
38