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 | 6 | 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 | * @throws |
||
115 | * |
||
116 | * @return JsonResponse |
||
117 | */ |
||
118 | 2 | public function getAll(Request $request, User $profileOwner, MovieRepository $repository) |
|
130 | |||
131 | /** |
||
132 | * @Route("/api/users/{user}/watchedMovies/{watchedMovieId}", methods={"DELETE"}); |
||
133 | * |
||
134 | * @param int $watchedMovieId |
||
135 | * @param WatchedMovieRepository $repository |
||
136 | * |
||
137 | * @return JsonResponse |
||
138 | */ |
||
139 | public function deleteWatchedMovies(int $watchedMovieId, WatchedMovieRepository $repository) |
||
159 | |||
160 | /** |
||
161 | * @Route("/api/users/mergeWatchedMovies", methods={"POST"}); |
||
162 | * |
||
163 | * @param MergeWatchedMoviesRequest $mergeWatchedMoviesRequest |
||
164 | * @param WatchedMovieService $watchedMovieService |
||
165 | * |
||
166 | * @throws \Exception |
||
167 | * |
||
168 | * @return JsonResponse |
||
169 | */ |
||
170 | public function postMergeWatchedMovies(MergeWatchedMoviesRequest $mergeWatchedMoviesRequest, WatchedMovieService $watchedMovieService) |
||
187 | } |
||
188 |
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: