Skip to content

Commit b5d1547

Browse files
authored
Merge pull request #34 from ensi-platform/v8-task-110876
#110876 fix
2 parents bb13a45 + 9dee60c commit b5d1547

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Concerns/DecoratesBoolQuery.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ public function orWhereWildcard(string $field, string $query, ?WildcardOptions $
109109

110110
public function addMustBool(callable $fn): static
111111
{
112-
return $this->forwardCallTo($this->boolQuery(), __FUNCTION__, func_get_args());
112+
$this->forwardCallTo($this->boolQuery(), __FUNCTION__, func_get_args());
113+
114+
return $this;
113115
}
114116
}

src/Filtering/BoolQueryBuilder.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,7 @@ public function makeWildcard(string $field, string $query, ?WildcardOptions $opt
204204

205205
public function addMustBool(callable $fn): static
206206
{
207-
$boolCriteria = static::make();
208-
$fn($boolCriteria);
209-
$this->must->add($boolCriteria);
207+
$this->must->add(static::make(builder: $fn));
210208

211209
return $this;
212210
}

0 commit comments

Comments
 (0)