add underscore to camel case

This commit is contained in:
TomasVotruba 2020-03-09 18:15:08 +01:00
parent a16385b99b
commit 2c474ad3fb

View File

@ -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
*/