Skip to content

Commit

Permalink
fix grouping
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioMendolia committed Jan 21, 2024
1 parent 41e574f commit 89eddde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Repository/BookRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ public function countBooks(bool $group = false): array
if ($group) {
foreach ($results as $result) {
$type = self::extensionToType($result['extension']);
$types[$type] = $types[$type]??0 + $result['nb'];
$types[$type] = ($types[$type] ?? 0) + $result['nb'];
}
} else {
foreach ($results as $result) {
$types[$result['extension']] = $types[$result['extension']]??0 + $result['nb'];
$types[$result['extension']] = ($types[$result['extension']] ?? 0) + $result['nb'];
}
}

Expand Down

0 comments on commit 89eddde

Please sign in to comment.