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 5a10e23 commit f353e00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/Domain/Movie/MovieRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -909,14 +909,13 @@ 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.movies_id) AND wl.user_id = ?
ORDER BY LOWER(m.title)
SQL,
[$userId, $personId, $userId],
);
}


public function fetchFromWatchlistWithDirector(int $personId, int $userId) : array
{
return $this->dbConnection->fetchAllAssociative(
Expand All @@ -927,7 +926,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.movies_id)
ORDER BY LOWER(m.title)
SQL,
[$userId, $userId, $personId],
Expand Down
4 changes: 2 additions & 2 deletions templates/page/person.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
</div>
{% endif %}
{% if moviesFromWatchlistAsActor is not empty %}
<h4>From your watch list</h4>
<h6>From your watch list</h6>
<div class="row row-cols-3 row-cols-md-3 row-cols-lg-6" style="text-align: center;margin-top: 1rem">
{% for movieAsActor in moviesFromWatchlistAsActor %}
<div class="col position-relative" style="padding-bottom: 1rem;">
Expand Down Expand Up @@ -182,7 +182,7 @@
</div>

{% if moviesFromWatchlistAsDirector is not empty %}
<h4>From your watch list</h4>
<h6>From your watch list</h6>
<div class="row row-cols-3 row-cols-md-3 row-cols-lg-6" style="text-align: center;margin-top: 1rem">
{% for movieAsDirector in moviesFromWatchlistAsDirector %}
<div class="col position-relative" style="padding-bottom: 1rem">
Expand Down

0 comments on commit f353e00

Please sign in to comment.