Skip to content

Commit

Permalink
feat: add string typing
Browse files Browse the repository at this point in the history
  • Loading branch information
ALameLlama committed Mar 1, 2024
1 parent 7f84e6e commit b42b975
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Support/Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,7 @@ public static function snake($value, $delimiter = '_')
return static::$snakeCache[$key][$delimiter];
}

if (! ctype_lower($value)) {
if (! ctype_lower((string) $value)) {
$value = preg_replace('/\s+/u', '', ucwords($value));

$value = static::lower(preg_replace('/(.)(?=[A-Z])/u', '$1'.$delimiter, $value));
Expand Down

0 comments on commit b42b975

Please sign in to comment.