diff --git a/src/Macros/WhereFuzzy.php b/src/Macros/WhereFuzzy.php index 9299609..8d28c2b 100755 --- a/src/Macros/WhereFuzzy.php +++ b/src/Macros/WhereFuzzy.php @@ -62,7 +62,7 @@ public static function make(Builder $builder, $field, $value) : Builder protected static function pipeline($field, $native, $value) : Expression { $sql = collect(static::$matchers)->map( - fn ($multiplier, $matcher) => + fn($multiplier, $matcher) => (new $matcher($multiplier))->buildQueryString("COALESCE($native, '')", $value) ); diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index 120cd60..b6e88f8 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -16,7 +16,7 @@ class ServiceProvider extends Provider **/ public function boot() : void { - Builder::macro('orderByFuzzy', fn ($fields) => OrderByFuzzy::make($this, $fields)); - Builder::macro('whereFuzzy', fn ($field, $value) => WhereFuzzy::make($this, $field, $value)); + Builder::macro('orderByFuzzy', fn($fields) => OrderByFuzzy::make($this, $fields)); + Builder::macro('whereFuzzy', fn($field, $value) => WhereFuzzy::make($this, $field, $value)); } }