1 | <?php |
||
20 | class WatchedMovieController extends BaseController |
||
21 | { |
||
22 | /** |
||
23 | * @Route("/api/users/watchedMovies", methods={"POST"}); |
||
24 | * |
||
25 | * @param AddWatchedMovieRequest $addWatchedMovieRequest |
||
26 | * @param Request $request |
||
27 | * @param WatchedMovieService $watchedMovieService |
||
28 | * |
||
29 | * @throws \Exception|NotFoundHttpException |
||
30 | * |
||
31 | * @return JsonResponse |
||
32 | */ |
||
33 | 2 | public function postWatchedMovies(AddWatchedMovieRequest $addWatchedMovieRequest, Request $request, WatchedMovieService $watchedMovieService) |
|
46 | |||
47 | /** |
||
48 | * @Route("/api/users/{id}/watchedMovies", methods={"GET"}); |
||
49 | * |
||
50 | * @param Request $request |
||
51 | * @param User $user |
||
52 | * |
||
53 | * @return JsonResponse |
||
54 | */ |
||
55 | public function getAll(Request $request, User $user, MovieRepository $repository) |
||
70 | |||
71 | /** |
||
72 | * @Route("/api/users/mergeWatchedMovies", methods={"POST"}); |
||
73 | * |
||
74 | * @param MergeWatchedMoviesRequest $mergeWatchedMoviesRequest |
||
75 | * @param WatchedMovieService $watchedMovieService |
||
76 | * |
||
77 | * @throws \Exception |
||
78 | * |
||
79 | * @return JsonResponse |
||
80 | */ |
||
81 | public function postMergeWatchedMovies(MergeWatchedMoviesRequest $mergeWatchedMoviesRequest, WatchedMovieService $watchedMovieService) |
||
98 | } |
||
99 |
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: