1 | <?php |
||
21 | class WatchedMovieController extends BaseController |
||
22 | { |
||
23 | /** |
||
24 | * @Route("/api/users/watchedMovies", methods={"POST"}); |
||
25 | * |
||
26 | * @param AddWatchedMovieRequest $addWatchedMovieRequest |
||
27 | * @param Request $request |
||
28 | * @param WatchedMovieService $watchedMovieService |
||
29 | * |
||
30 | * @throws \Exception|NotFoundHttpException |
||
31 | * |
||
32 | * @return JsonResponse |
||
33 | */ |
||
34 | 2 | public function postWatchedMovies(AddWatchedMovieRequest $addWatchedMovieRequest, Request $request, WatchedMovieService $watchedMovieService) |
|
47 | |||
48 | /** |
||
49 | * @Route("/api/users/{id}/watchedMovies", methods={"GET"}); |
||
50 | * |
||
51 | * @param Request $request |
||
52 | * @param User $user |
||
53 | * @param MovieRepository $repository |
||
54 | * |
||
55 | * @return JsonResponse |
||
56 | */ |
||
57 | public function getAll(Request $request, User $user, MovieRepository $repository) |
||
72 | |||
73 | /** |
||
74 | * @Route("/api/users/{user}/watchedMovies/{watchedMovieId}", methods={"DELETE"}); |
||
75 | * @param int $watchedMovieId |
||
76 | * @param WatchedMovieRepository $repository |
||
77 | * @return JsonResponse |
||
78 | */ |
||
79 | public function deleteWatchedMovies(int $watchedMovieId, WatchedMovieRepository $repository) |
||
103 | |||
104 | /** |
||
105 | * @Route("/api/users/mergeWatchedMovies", methods={"POST"}); |
||
106 | * |
||
107 | * @param MergeWatchedMoviesRequest $mergeWatchedMoviesRequest |
||
108 | * @param WatchedMovieService $watchedMovieService |
||
109 | * |
||
110 | * @throws \Exception |
||
111 | * |
||
112 | * @return JsonResponse |
||
113 | */ |
||
114 | public function postMergeWatchedMovies(MergeWatchedMoviesRequest $mergeWatchedMoviesRequest, WatchedMovieService $watchedMovieService) |
||
131 | } |
||
132 |
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: