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 e11e15a commit 9c858b7
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 @@ -55,7 +55,7 @@ public function getReadBooks(?string $year, string $type): QueryBuilder

public static function extensionToType(string $extension): string
{
return match ($extension) {
return match (strtolower($extension)) {
'pdf' => 'pdf',
'epub', 'mobi' => 'book',
'cbr', 'cba', 'cbz', 'cbt', 'cb7' => 'comic',
Expand All @@ -69,7 +69,7 @@ public static function extensionsFromType(string $type): array
return ['pdf', 'epub', 'mobi', 'cbr', 'cba', 'cbz', 'cbt', 'cb7'];
}

return match ($type) {
return match (strtolower($type)) {
'pdf' => ['pdf'],
'book' => ['epub', 'mobi'],
'comic' => ['cbr', 'cba', 'cbz', 'cbt', 'cb7'],
Expand Down

0 comments on commit 9c858b7

Please sign in to comment.