<commit_before><?php

function smarty_function_component(array $params, Smarty_Internal_Template $template) {

    /** @var CM_Frontend_Render $render */
    $render = $template->smarty->getTemplateVars('render');

    if (empty($params['name'])) {
        trigger_error('Param `name` missing.');
    }
    $classname = null;
    $name = $params['name'];
    unset($params['name']);

    if (class_exists($name)) {
        $classname = $name;
    } else {
        if (0 === strpos($name, '*_')) {
            $classname = $render->getClassnameByPartialClassname(mb_substr($name, 2));
        }
    }

    $component = CM_Component_Abstract::factory($classname, $params);
    $renderAdapter = CM_RenderAdapter_Component::factory($render, $component);
    return $renderAdapter->fetch();
}<commit_msg>remove not needed get_class check<commit_after><?php

function smarty_function_component(array $params, Smarty_Internal_Template $template) {

    /** @var CM_Frontend_Render $render */
    $render = $template->smarty->getTemplateVars('render');

    if (empty($params['name'])) {
        trigger_error('Param `name` missing.');
    }
    $classname = null;
    $name = $params['name'];
    unset($params['name']);

    if (0 === strpos($name, '*_')) {
        $name = $render->getClassnameByPartialClassname(mb_substr($name, 2));
    }

    $component = CM_Component_Abstract::factory($name, $params);
    $renderAdapter = CM_RenderAdapter_Component::factory($render, $component);
    return $renderAdapter->fetch();
}
{'fraction_non_alphanumeric': 0.16798418972332016, 'fraction_numerical': 0.002635046113306983, 'mean_word_length': 4.080267558528428, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2004797', 'n_tokens_mistral': 461, 'n_tokens_neox': 457, 'n_words': 79}