diff --git a/src/Macros/StrMacros.php b/src/Macros/StrMacros.php index b3fec98..0310fbc 100644 --- a/src/Macros/StrMacros.php +++ b/src/Macros/StrMacros.php @@ -60,7 +60,7 @@ public static function firstAndLastWords(): void ->values() ->whenNotEmpty(function (Collection $words): string { return trim($words->first().' '.$words->last()); - }, $string); + }, fn () => $string); }); }