Completed
Pull Request — master (#30)
by
unknown
04:23
created

SurveyFilter::setStart()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace AppBundle\Entity\DTO;
4
5
use Symfony\Component\Validator\Constraints as Assert;
6
use AppBundle\Entity\Survey\SurveyType;
7
8
class SurveyFilter
9
{
10
    /**
11
     * @var \DateTime
12
     * @Assert\Date()
13
     */
14
    private $start;
15
16
    /**
17
     * @var \DateTime
18
     * @Assert\Date()
19
     */
20
    private $end;
21
22
    /**
23
     * @var SurveyType
24
     * @Assert\Type("object")
25
     * @Assert\Valid
26
     */
27
    private $type;
28
29
    /**
30
     * Set start.
31
     *
32
     * @param \DateTime $date
33
     *
34
     * @return SurveyFilter
35
     */
36 1
    public function setStart($date)
37
    {
38 1
        $this->start = $date;
39
40 1
        return $this;
41
    }
42
43
    /**
44
     * Get start.
45
     *
46
     * @return \DateTime
47
     */
48 1
    public function getStart()
49
    {
50 1
        return $this->start;
51
    }
52
53
    /**
54
     * Set end.
55
     *
56
     * @param \DateTime $date
57
     *
58
     * @return SurveyFilter
59
     */
60 1
    public function setEnd($date)
61
    {
62 1
        $this->end = $date;
63
64 1
        return $this;
65
    }
66
    /**
67
     * Get end.
68
     *
69
     * @return \DateTime
70
     */
71 1
    public function getEnd()
72
    {
73 1
        return $this->end;
74
    }
75
76
    /**
77
     * Set type.
78
     *
79
     * @param SurveyType $type
80
     *
81
     * @return SurveyFilter
82
     */
83 1
    public function setType(SurveyType $type)
84
    {
85 1
        $this->type = $type;
86
87 1
        return $this;
88
    }
89
90
    /**
91
     * Get type.
92
     *
93
     * @return SurveyType
94
     */
95 1
    public function getType()
96
    {
97 1
        return $this->type;
98
    }
99
}
100