Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Lee Peuker <[email protected]>
  • Loading branch information
sahinakkaya and leepeuker authored Nov 12, 2023
1 parent 95757b8 commit 2e8c2d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Domain/Movie/MovieRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ public function fetchFromWatchlistWithActor(int $personId, int $userId) : array
JOIN person p ON mc.person_id = p.id
JOIN watchlist wl ON m.id = wl.movie_id
LEFT JOIN movie_user_rating mur ON wl.movie_id = mur.movie_id and mur.user_id = ?
WHERE p.id = ? AND m.id IN (SELECT DISTINCT movie_id FROM watchlist) AND wl.user_id = ?
WHERE p.id = ? AND m.id IN (wl.movie_id) AND wl.user_id = ?
ORDER BY LOWER(m.title)
SQL,
[$userId, $personId, $userId],
Expand All @@ -927,7 +927,7 @@ public function fetchFromWatchlistWithDirector(int $personId, int $userId) : arr
JOIN person p ON mc.person_id = p.id
JOIN watchlist wl ON m.id = wl.movie_id and wl.user_id = ?
LEFT JOIN movie_user_rating mur ON wl.movie_id = mur.movie_id and mur.user_id = ?
WHERE p.id = ? AND m.id IN (SELECT DISTINCT movie_id FROM watchlist)
WHERE p.id = ? AND m.id IN (wl.movie_id)
ORDER BY LOWER(m.title)
SQL,
[$userId, $userId, $personId],
Expand Down

0 comments on commit 2e8c2d9

Please sign in to comment.