Skip to content

Commit

Permalink
fix phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
moitran committed Jun 1, 2024
1 parent 95f936b commit e2465e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/ElasticSearch/QueryBuilder/BookElasticQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ public function build(FormRequest $request): Builder
$providerId = $request->query('provider_id');

/** @var Builder $builder */
$builder = Book::search()
->property(TrackTotalHits::all());
$builder = Book::search();

if ($query) {
$bool = new BoolQuery();
Expand All @@ -45,6 +44,8 @@ public function build(FormRequest $request): Builder
$builder->must(new Nested('provider', new Term('provider.id', $providerId)));
}

$builder->property(TrackTotalHits::all());

return $builder;
}
}

0 comments on commit e2465e0

Please sign in to comment.