Completed
Push — master ( 4966f7...fc3644 )
by WEBEWEB
01:31
created

DateTimeDateTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 28
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDate() 0 3 1
A setDate() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the core-bundle package.
5
 *
6
 * (c) 2019 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\CoreBundle\Model\Attribute;
13
14
use DateTime;
15
16
/**
17
 * Date/time date trait.
18
 *
19
 * @author webeweb <https://github.com/webeweb/>
20
 * @package WBW\Bundle\CoreBundle\Model\Attribute
21
 */
22
trait DateTimeDateTrait {
23
24
    /**
25
     * Date.
26
     *
27
     * @var DateTime
28
     */
29
    protected $date;
30
31
    /**
32
     * Get the date.
33
     *
34
     * @return DateTime Returns the date.
35
     */
36
    public function getDate() {
37
        return $this->date;
38
    }
39
40
    /**
41
     * Set the date.
42
     *
43
     * @param DateTime|null $date The date.
44
     */
45
    public function setDate(DateTime $date = null) {
46
        $this->date = $date;
47
        return $this;
48
    }
49
}
50