update v1.0.7.9 R.C.
This is a Release Candidate. We are still testing.
This commit is contained in:
@@ -386,10 +386,10 @@ class Str
|
||||
*/
|
||||
public static function snake($value, $delimiter = '_')
|
||||
{
|
||||
$key = $value.$delimiter;
|
||||
$key = $value;
|
||||
|
||||
if (isset(static::$snakeCache[$key])) {
|
||||
return static::$snakeCache[$key];
|
||||
if (isset(static::$snakeCache[$key][$delimiter])) {
|
||||
return static::$snakeCache[$key][$delimiter];
|
||||
}
|
||||
|
||||
if (! ctype_lower($value)) {
|
||||
@@ -398,7 +398,7 @@ class Str
|
||||
$value = static::lower(preg_replace('/(.)(?=[A-Z])/u', '$1'.$delimiter, $value));
|
||||
}
|
||||
|
||||
return static::$snakeCache[$key] = $value;
|
||||
return static::$snakeCache[$key][$delimiter] = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user