mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 03:35:01 +01:00
add underscore to camel case
This commit is contained in:
parent
a16385b99b
commit
2c474ad3fb
@ -52,6 +52,18 @@ final class RectorStrings
|
||||
return self::camelCaseToGlue($input, '_');
|
||||
}
|
||||
|
||||
public function underscoreToCamelCase(string $input): string
|
||||
{
|
||||
$nameParts = explode('_', $input);
|
||||
$camelCase = '';
|
||||
|
||||
foreach ($nameParts as $namePart) {
|
||||
$camelCase .= ucfirst($namePart);
|
||||
}
|
||||
|
||||
return $camelCase;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[] $prefixesToRemove
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user