1 | <?php |
||
23 | class WatchedMovieController extends BaseController |
||
24 | { |
||
25 | /** |
||
26 | * @Route("/api/users/watchedMovies", methods={"POST"}); |
||
27 | * |
||
28 | * @param AddWatchedMovieRequest $addWatchedMovieRequest |
||
29 | * @param Request $request |
||
30 | * @param WatchedMovieService $watchedMovieService |
||
31 | * |
||
32 | * @throws \Exception|NotFoundHttpException |
||
33 | * |
||
34 | * @return JsonResponse |
||
35 | */ |
||
36 | 4 | public function postWatchedMovies(AddWatchedMovieRequest $addWatchedMovieRequest, Request $request, WatchedMovieService $watchedMovieService) |
|
49 | |||
50 | /** |
||
51 | * @Route("/api/users/{user}/watchedMovies/{watchedMovie}", methods={"PATCH"}); |
||
52 | * |
||
53 | * @param UserWatchedMovie $watchedMovie |
||
54 | * @param UpdateWatchedMovieRequest $request |
||
55 | * @param WatchedMovieService $watchedMovieService |
||
56 | * |
||
57 | * @throws \Exception |
||
58 | * |
||
59 | * @return JsonResponse |
||
60 | */ |
||
61 | 1 | public function patchWatchedMoviesById(UserWatchedMovie $watchedMovie, UpdateWatchedMovieRequest $request, WatchedMovieService $watchedMovieService) |
|
76 | |||
77 | /** |
||
78 | * @Route("/api/users/{user}/watchedMovies/movie/{movieId}", methods={"PATCH"}); |
||
79 | * |
||
80 | * @param int $movieId |
||
81 | * @param UpdateWatchedMovieRequest $request |
||
82 | * @param WatchedMovieService $watchedMovieService |
||
83 | * |
||
84 | * @throws \Exception |
||
85 | * |
||
86 | * @return JsonResponse |
||
87 | */ |
||
88 | 1 | public function patchWatchedMoviesByMovieId(int $movieId, UpdateWatchedMovieRequest $request, WatchedMovieService $watchedMovieService, WatchedMovieRepository $repository) |
|
106 | |||
107 | /** |
||
108 | * @Route("/api/users/{id<\d+>}/watchedMovies", methods={"GET"}); |
||
109 | * |
||
110 | * @param Request $request |
||
111 | * @param User $profileOwner |
||
112 | * @param MovieRepository $repository |
||
113 | * |
||
114 | * @return JsonResponse |
||
115 | */ |
||
116 | public function getAll(Request $request, User $profileOwner, MovieRepository $repository) |
||
139 | |||
140 | /** |
||
141 | * @Route("/api/users/{username}/watchedMovies", methods={"GET"}); |
||
142 | * @ParamConverter("user", options={"mapping"={"username"="username"}}) |
||
143 | * |
||
144 | * @param Request $request |
||
145 | * @param User $profileOwner |
||
146 | * @param MovieRepository $repository |
||
147 | * |
||
148 | * @return JsonResponse |
||
149 | */ |
||
150 | 2 | public function getAllByUsername(Request $request, User $profileOwner, MovieRepository $repository) |
|
173 | |||
174 | /** |
||
175 | * @Route("/api/users/{user}/watchedMovies/{watchedMovieId}", methods={"DELETE"}); |
||
176 | * |
||
177 | * @param int $watchedMovieId |
||
178 | * @param WatchedMovieRepository $repository |
||
179 | * |
||
180 | * @return JsonResponse |
||
181 | */ |
||
182 | public function deleteWatchedMovies(int $watchedMovieId, WatchedMovieRepository $repository) |
||
202 | |||
203 | /** |
||
204 | * @Route("/api/users/mergeWatchedMovies", methods={"POST"}); |
||
205 | * |
||
206 | * @param MergeWatchedMoviesRequest $mergeWatchedMoviesRequest |
||
207 | * @param WatchedMovieService $watchedMovieService |
||
208 | * |
||
209 | * @throws \Exception |
||
210 | * |
||
211 | * @return JsonResponse |
||
212 | */ |
||
213 | public function postMergeWatchedMovies(MergeWatchedMoviesRequest $mergeWatchedMoviesRequest, WatchedMovieService $watchedMovieService) |
||
230 | } |
||
231 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: