Skip to content

Commit

Permalink
refactor: fix PHP styling
Browse files Browse the repository at this point in the history
  • Loading branch information
ScuffedNewt authored and github-actions[bot] committed Aug 27, 2024
1 parent 245fa04 commit 269c2e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/BrowseController.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,14 @@ public function getCharacters(Request $request) {
if (config('lorekeeper.extensions.exclusionary_search')) {
$imageQuery->whereHas('subtypes', function ($query) use ($request) {
$subtypeIds = $request->get('subtype_ids');

// Filter to ensure the character has all the specified subtypes
$query->whereIn('character_image_subtypes.subtype_id', $subtypeIds)
->groupBy('character_image_subtypes.character_image_id')
->havingRaw('COUNT(character_image_subtypes.subtype_id) = ?', [count($subtypeIds)]);
})->whereDoesntHave('subtypes', function ($query) use ($request) {
$subtypeIds = $request->get('subtype_ids');

// Ensure that no additional subtypes are present
$query->whereNotIn('character_image_subtypes.subtype_id', $subtypeIds);
});
Expand Down

0 comments on commit 269c2e2

Please sign in to comment.