1 | <?php |
||
17 | class CalendarController extends JsonController |
||
18 | { |
||
19 | /** |
||
20 | * @Route("/schedule/events") |
||
21 | * @Method("GET") |
||
22 | * |
||
23 | * @return JsonResponse |
||
24 | */ |
||
25 | public function eventsListAction() |
||
33 | |||
34 | /** |
||
35 | * @param Request $request |
||
36 | * @Route("/schedule/event/new") |
||
37 | * @Method("POST") |
||
38 | * |
||
39 | * @return JsonResponse |
||
40 | */ |
||
41 | public function newEventAction(Request $request) |
||
65 | |||
66 | /** |
||
67 | * @param $id |
||
68 | * @Route("/schedule/event/{id}") |
||
69 | * @Method("GET") |
||
70 | * |
||
71 | * @return JsonResponse |
||
72 | */ |
||
73 | public function singleEventAction($id) |
||
83 | |||
84 | /** |
||
85 | * @Route("/api/schedule/event/user") |
||
86 | * @Method("GET") |
||
87 | * |
||
88 | * @return JsonResponse |
||
89 | */ |
||
90 | public function currentUserEventsAction() |
||
111 | |||
112 | /** |
||
113 | * @Route("/schedule/event/user/{id}") |
||
114 | * @Method("GET") |
||
115 | * |
||
116 | * @return JsonResponse |
||
117 | */ |
||
118 | public function userEventsAction(User $user) |
||
139 | |||
140 | /** |
||
141 | * @param $id |
||
142 | * @Route("/schedule/event/{id}") |
||
143 | * @Method("DELETE") |
||
144 | * @return JsonResponse |
||
145 | */ |
||
146 | public function removeEventAction($id) |
||
153 | |||
154 | /** |
||
155 | * @param Request $request |
||
156 | * @Method("PATCH") |
||
157 | * @Route("/schedule/event/{id}") |
||
158 | * |
||
159 | * @return JsonResponse |
||
160 | */ |
||
161 | public function editEventAction(Request $request, $id) |
||
171 | |||
172 | /** |
||
173 | * FOR DEV ONLY. |
||
174 | * |
||
175 | * @Route("/schedule/clear") |
||
176 | */ |
||
177 | public function clearAction() |
||
183 | } |
||
184 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.