Completed
Pull Request — master (#30)
by
unknown
03:43
created

FormRequest::setStatus()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 0
cts 3
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace AppBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Knp\DoctrineBehaviors\Model as ORMBehaviors;
7
use Symfony\Component\Validator\Constraints as Assert;
8
9
/**
10
 * FormRequest.
11
 *
12
 * @ORM\Entity(repositoryClass="AppBundle\Repository\FormRequestRepository")
13
 */
14
class FormRequest
15
{
16
    use ORMBehaviors\Timestampable\Timestampable;
17
18
    /**
19
     * @var int
20
     *
21
     * @ORM\Column(name="id", type="integer")
22
     * @ORM\Id
23
     * @ORM\GeneratedValue(strategy="AUTO")
24
     */
25
    private $id;
26
27
    /**
28
     * @var FormRequestType
29
     * @Assert\Type("object")
30
     * @Assert\Valid
31
     * @ORM\ManyToOne(targetEntity="FormRequestType", inversedBy="requests")
32
     */
33
    private $type;
34
35
    /**
36
     * @var string
37
     * @Assert\NotBlank()
38
     * @Assert\Type("string")
39
     * @Assert\Length(
40
     *      max = 255
41
     * )
42
     * @ORM\Column(type="string", length=255)
43
     */
44
    private $status;
45
46
    /**
47
     * @var User
48
     * @Assert\Type("object")
49
     * @Assert\Valid
50
     * @ORM\ManyToOne(targetEntity="User", inversedBy="formRequests")
51
     */
52
    private $user;
53
54
    /**
55
     * @var \DateTime
56
     * @Assert\Date()
57
     * @ORM\Column(type="datetime")
58
     */
59
    private $date;
60
61
    /**
62
     * Get id.
63
     *
64
     * @return int
65
     */
66
    public function getId()
67
    {
68
        return $this->id;
69
    }
70
71
    /**
72
     * Set type.
73
     *
74
     * @param FormRequestType $type
75
     *
76
     * @return FormRequest
77
     */
78
    public function setType(FormRequestType $type)
79
    {
80
        $this->type = $type;
81
82
        return $this;
83
    }
84
85
    /**
86
     * Get type.
87
     *
88
     * @return FormRequestType
89
     */
90
    public function getType()
91
    {
92
        return $this->type;
93
    }
94
95
    /**
96
     * Set status.
97
     *
98
     * @param string $status
99
     *
100
     * @return FormRequest
101
     */
102
    public function setStatus($status)
103
    {
104
        $this->status = $status;
105
106
        return $this;
107
    }
108
109
    /**
110
     * Get status.
111
     *
112
     * @return string
113
     */
114
    public function getStatus()
115
    {
116
        return $this->status;
117
    }
118
119
    /**
120
     * Set user.
121
     *
122
     * @param User $user
123
     *
124
     * @return FormRequest
125
     */
126
    public function setUser(User $user)
127
    {
128
        $this->user = $user;
129
130
        return $this;
131
    }
132
133
    /**
134
     * Get user.
135
     *
136
     * @return User
137
     */
138
    public function getUser()
139
    {
140
        return $this->user;
141
    }
142
143
    /**
144
     * Set date.
145
     *
146
     * @param \DateTime $date
147
     *
148
     * @return FormRequest
149
     */
150
    public function setDate($date)
151
    {
152
        $this->date = $date;
153
154
        return $this;
155
    }
156
    /**
157
     * Get date.
158
     *
159
     * @return \DateTime
160
     */
161
    public function getDate()
162
    {
163
        return $this->date;
164
    }
165
}
166