private function humanize(string $text): string
    {
        $replace = ['Content Type'];
        $search = ['class'];

        return ucfirst(trim(str_replace($search, $replace, strtolower(preg_replace(['/([A-Z])/', '/[_\s]+/'], ['_$1', ' '], $text)))));
    }
private function humanize(string $text): string
    {
        $replace = ['Content Type'];
        $search = ['class'];

        return ucfirst(trim(str_replace($search, $replace, strtolower(preg_replace(['/([A-Z])/', '/[_\s]+/'], ['_$1', ' '], $text)))));
    }
private function humanize ( string $ text ) : string { $ replace = [ 'Content Type' ] ; $ search = [ 'class' ] ; return ucfirst ( trim ( str_replace ( $ search , $ replace , strtolower ( preg_replace ( [ '/([A-Z])/' , '/[_\s]+/' ] , [ '_$1' , ' ' ] , $ text ) ) ) ) ) ; }
Makes a technical name human readable.

Sequences of underscores are replaced by single spaces. The first letter
of the resulting string is capitalized, while all other letters are
turned to lowercase.

@see \Symfony\Component\Form\FormRenderer::humanize()

@param string $text the text to humanize

@return string the humanized text
Makes a technical name human readable .