1 | <?php |
||
18 | class Booking implements JsonSerializable |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * @ORM\Id |
||
23 | * @ORM\ManyToOne(targetEntity="JhUser\Entity\User") |
||
24 | */ |
||
25 | protected $user = null; |
||
26 | |||
27 | /** |
||
28 | * @var DateTime |
||
29 | * |
||
30 | * @ORM\Id |
||
31 | * @ORM\Column(type="date", name="date", nullable=false) |
||
32 | */ |
||
33 | protected $date; |
||
34 | |||
35 | /** |
||
36 | * @var DateTime |
||
37 | * |
||
38 | * @ORM\Column(type="time", name="start_time", nullable=false) |
||
39 | */ |
||
40 | protected $startTime; |
||
41 | |||
42 | /** |
||
43 | * @var DateTime |
||
44 | * |
||
45 | * @ORM\Column(type="time", name="end_time", nullable=false) |
||
46 | */ |
||
47 | protected $endTime; |
||
48 | |||
49 | /** |
||
50 | * @var int |
||
51 | * |
||
52 | * @ORM\Column(type="string", length=255, nullable=false) |
||
53 | */ |
||
54 | protected $total = 0; |
||
55 | |||
56 | /** |
||
57 | * @var int |
||
58 | * |
||
59 | * @ORM\Column(type="string", length=255, nullable=false) |
||
60 | */ |
||
61 | protected $balance = 0; |
||
62 | |||
63 | /** @var string |
||
64 | * |
||
65 | * @ORM\Column(type="string", length=512, nullable=true) |
||
66 | */ |
||
67 | protected $notes = null; |
||
68 | |||
69 | /** |
||
70 | * Set Defaults |
||
71 | */ |
||
72 | public function __construct() |
||
78 | |||
79 | /** |
||
80 | * @return string |
||
81 | */ |
||
82 | public function getId() |
||
90 | |||
91 | /** |
||
92 | * |
||
93 | * @param \ZfcUser\Entity\UserInterface $user |
||
94 | * @return \JhFlexiTime\Entity\Booking |
||
95 | */ |
||
96 | public function setUser(UserInterface $user) |
||
101 | |||
102 | /** |
||
103 | * @return \ZfcUser\Entity\UserInterface |
||
104 | */ |
||
105 | public function getUser() |
||
109 | |||
110 | /** |
||
111 | * @param DateTime $date |
||
112 | * @return \JhFlexiTime\Entity\Booking |
||
113 | */ |
||
114 | public function setDate(DateTime $date) |
||
119 | |||
120 | /** |
||
121 | * @return DateTime |
||
122 | */ |
||
123 | public function getDate() |
||
127 | |||
128 | /** |
||
129 | * @param DateTime $startTime |
||
130 | * @return \JhFlexiTime\Entity\Booking |
||
131 | */ |
||
132 | public function setStartTime(DateTime $startTime) |
||
137 | |||
138 | /** |
||
139 | * @return DateTime |
||
140 | */ |
||
141 | public function getStartTime() |
||
145 | |||
146 | /** |
||
147 | * @param DateTime $endTime |
||
148 | * @return \JhFlexiTime\Entity\Booking |
||
149 | */ |
||
150 | public function setEndTime(DateTime $endTime) |
||
155 | |||
156 | /** |
||
157 | * @return DateTime |
||
158 | */ |
||
159 | public function getEndTime() |
||
163 | |||
164 | /** |
||
165 | * @param string $total |
||
166 | * @return \JhFlexiTime\Entity\Booking |
||
167 | */ |
||
168 | public function setTotal($total) |
||
173 | |||
174 | /** |
||
175 | * @return string |
||
176 | */ |
||
177 | public function getTotal() |
||
181 | |||
182 | /** |
||
183 | * @param int $balance |
||
184 | * @return \JhFlexiTime\Entity\Booking |
||
185 | */ |
||
186 | public function setBalance($balance) |
||
191 | |||
192 | /** |
||
193 | * @return int |
||
194 | */ |
||
195 | public function getBalance() |
||
199 | |||
200 | /** |
||
201 | * @param string $notes |
||
202 | * @return \JhFlexiTime\Entity\Booking |
||
203 | */ |
||
204 | public function setNotes($notes) |
||
209 | |||
210 | /** |
||
211 | * @return string |
||
212 | */ |
||
213 | public function getNotes() |
||
217 | |||
218 | /** |
||
219 | * @return array |
||
220 | */ |
||
221 | public function jsonSerialize() |
||
234 | } |
||
235 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.