Skip to content

Commit

Permalink
fix: StringHandler::variablize method with non-alphanum characters
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Jul 2, 2024
1 parent d90c04a commit 6db4486
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Models/src/Utils/StringHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public static function variablize(?string $string): string

return (new UnicodeString($string))
->ascii()
->replaceMatches('#([^a-zA-Z0-9]+)#', '_')
->snake()
->lower()
->trim('-')
Expand Down

0 comments on commit 6db4486

Please sign in to comment.