Completed
Pull Request — master (#516)
by Gary
09:31
created

FormDateSelect::setDate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace DoctrineORMModuleTest\Assets\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Zend\Form\Annotation as Form;
7
8
/**
9
 * @ORM\Entity
10
 * @ORM\Table(name="doctrine_orm_module_dateselect")
11
 */
12
class FormDateSelect
13
{
14
    /**
15
     * @ORM\Id
16
     * @ORM\Column(type="integer")
17
     * @ORM\GeneratedValue(strategy="AUTO")
18
     */
19
    protected $id;
20
21
    /**
22
     * @ORM\Column(type="date", nullable=true)
23
     * @Form\Type("DateSelect")
24
     */
25
    protected $date;
26
27
    /**
28
     * @return int|null
29
     */
30
    public function getId()
31
    {
32
        return $this->id;
33
    }
34
35
    /**
36
     * @param \DateTime $date
37
     */
38
    public function setDate($date)
39
    {
40
        $this->date = $date;
41
    }
42
43
    /**
44
     * @return \DateTime
45
     */
46
    public function getDate()
47
    {
48
        return $this->date;
49
    }
50
}
51