Skip to content
Snippets Groups Projects
Commit a19afbe7 authored by Quentin Ribac's avatar Quentin Ribac
Browse files

FEAT #18096 TIME 0:02 minor fix in TextFormatModel::camelToSnake()

parent da39b81b
No related branches found
No related tags found
No related merge requests found
......@@ -131,7 +131,7 @@ class TextFormatModel
public static function camelToSnake($subject) {
$snakeCaseSubject = '';
foreach (str_split($subject) as $index => $character) {
if ($index > 0 && strtoupper($character) == $character && strpos('0123456789', $character) === false) {
if ($index > 0 && strtoupper($character) == $character && strpos('0123456789_', $character) === false) {
$character = strtolower($character);
$character = '_' . $character;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment