<commit_before><?php
/**
 * @param array                    $params
 * @param Smarty_Internal_Template $template
 * @return bool
 */
function smarty_function_advertisement(array $params, Smarty_Internal_Template $template) {
	if (!isset($params['zone'])) {
		trigger_error('Param `zone` missing.');
	}
	return '<div class="advertisement">' . CM_Adprovider::getInstance()->getHtml($params['zone']) . '</div>';
}<commit_msg>Allow to pass variables in smarty function<commit_after><?php
/**
 * @param array                    $params
 * @param Smarty_Internal_Template $template
 * @return bool
 */
function smarty_function_advertisement(array $params, Smarty_Internal_Template $template) {
	if (!isset($params['zone'])) {
		trigger_error('Param `zone` missing.');
	}
	$variables = isset($params['variables']) ? $params['variables'] : null;
	return '<div class="advertisement">' . CM_Adprovider::getInstance()->getHtml($params['zone'], $variables) . '</div>';
}
{'fraction_non_alphanumeric': 0.1722338204592902, 'fraction_numerical': 0.0, 'mean_word_length': 5.2272727272727275, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3626478', 'n_tokens_mistral': 283, 'n_tokens_neox': 274, 'n_words': 59}