Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanomatteo authored and github-actions[bot] committed Nov 10, 2022
1 parent f41191a commit 34c3349
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/Parsers/Query/QueryParserMysqlFullTextBool.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,12 @@ public function runExtractors(string $tmpQuery): Collection
public function filterTokens(Collection $tokens): Collection
{
return $tokens->map(function (string $word) {

if (Str::contains($word, static::DEF_RESERVED_CHARS)) {
return '"' . trim(str_replace('"', ' ', $word)) . '"';
} else {
return collect(preg_split("/[\\s[:punct:]]+/", $word))
->filter(fn ($s) => (strlen($s) > 2));
}

})->flatten();
}

Expand Down

0 comments on commit 34c3349

Please sign in to comment.