1 | <?php |
||
13 | class CalendarController extends Controller |
||
14 | { |
||
15 | /** |
||
16 | * @Route("/schedule/events") |
||
17 | * @Method("GET") |
||
18 | * |
||
19 | * @return JsonResponse |
||
20 | */ |
||
21 | public function eventsListAction() |
||
29 | |||
30 | /** |
||
31 | * @param Request $request |
||
32 | * @param User $user |
||
33 | * @Route("/schedule/event/new/{id}") |
||
34 | * @Method({"GET", "POST"}) |
||
35 | * |
||
36 | * @return JsonResponse |
||
37 | */ |
||
38 | public function newEventAction(Request $request, User $user) |
||
58 | |||
59 | /** |
||
60 | * @param $id |
||
61 | * @Route("/schedule/event/{id}") |
||
62 | * @Method("GET") |
||
63 | * |
||
64 | * @return JsonResponse |
||
65 | */ |
||
66 | public function singleEventAction($id) |
||
76 | |||
77 | /** |
||
78 | * @param User $user |
||
79 | * @Route("/schedule/event/user/{id}") |
||
80 | * @Method("GET") |
||
81 | * |
||
82 | * @return JsonResponse |
||
83 | */ |
||
84 | public function usersEventAction(User $user) |
||
103 | |||
104 | /** |
||
105 | * @param $id |
||
106 | * @Route("/schedule/event/remove/{id}") |
||
107 | * |
||
108 | * @return JsonResponse |
||
109 | */ |
||
110 | public function removeEventAction($id) |
||
117 | |||
118 | /** |
||
119 | * @param Request $request |
||
120 | * @param $id |
||
121 | * @Route("/schedule/event/edit/{id}") |
||
122 | * |
||
123 | * @return JsonResponse |
||
124 | */ |
||
125 | public function editEventAction(Request $request, $id) |
||
133 | |||
134 | /** |
||
135 | * FOR DEV ONLY. |
||
136 | * |
||
137 | * @Route("/schedule/clear") |
||
138 | */ |
||
139 | public function clearAction() |
||
145 | } |
||
146 |
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.