Skip to content

Commit

Permalink
Fix overcounting stars because of inclusive range (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jade-GG authored Jul 21, 2023
1 parent 54fca19 commit e82013e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tags/Reviews.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function getRatingData(): array

for ($star = 1; $star <= 5; $star++) {
$maxScore = $star * 2;
$minScore = $maxScore - 2;
$minScore = $maxScore - 1;
$reviewsCount = EntryFacade::query()
->where('collection', 'reviews')
->whereBetween('total_score', [$minScore, $maxScore])
Expand Down

0 comments on commit e82013e

Please sign in to comment.