src/Transformer/Helpers/RecursiveFormatterHelper.php
public static function camelCaseToUnderscore(string $camel, string $splitter = '_') : string
    {
        $camel = \preg_replace(
            '/(?!^)[[:upper:]][[:lower:]]/',
            '$0',
            \preg_replace('/(?!^)[[:upper:]]+/', $splitter.'$0', $camel)
        );

        return \strtolower($camel);
    }
public static function camelCaseToUnderscore(string $camel, string $splitter = '_') : string
    {
        $camel = \preg_replace(
            '/(?!^)[[:upper:]][[:lower:]]/',
            '$0',
            \preg_replace('/(?!^)[[:upper:]]+/', $splitter.'$0', $camel)
        );

        return \strtolower($camel);
    }
public static function camelCaseToUnderscore ( string $ camel , string $ splitter = '_' ) : string { $ camel = \ preg_replace ( '/(?!^)[[:upper:]][[:lower:]]/' , '$0' , \ preg_replace ( '/(?!^)[[:upper:]]+/' , $ splitter . '$0' , $ camel ) ) ; return \ strtolower ( $ camel ) ; }
Transforms a given string from camelCase to under_score style.

@param string $camel
@param string $splitter

@return string
Transforms a given string from camelCase to under_score style .