<commit_before><?
defined('C5_EXECUTE') or die("Access Denied.");
class FormAttributeHelper {
	
	private $obj;
	
	public function setAttributeObject($obj) {
		$this->obj = $obj;
	}
	
	public function display($key, $required = false, $includeLabel = true) {
		if (is_object($key)) {
			$obj = $key;
		} else {
			$oclass = get_class($this->obj);
			switch($oclass) {
				case 'UserInfo':
					$class = 'UserAttributeKey';
					break;
				default:
					$class = $oclass . 'AttributeKey';
					break;
			}
			$obj = call_user_func(array($class, 'getByHandle'), $key);
		}
		
		if (!is_object($obj)) {
			return false;
		}
		
		if (is_object($this->obj)) {
			$value = $this->obj->getAttributeValueObject($obj);
		}
		$html = '<div class="clearfix">';
		if ($includeLabel) {
			$html .= $obj->render('label', false, true);
		}
		if ($required) {
			$html .= ' <span class="ccm-required">*</span>';
		}
		$html .= '<div class="input">';
		$html .= $obj->render('form', $value, true);
			
		$html .= '</div></div>';<commit_msg>attribute tweak on register<commit_after><?
defined('C5_EXECUTE') or die("Access Denied.");
class FormAttributeHelper {
	
	private $obj;
	
	public function setAttributeObject($obj) {
		$this->obj = $obj;
	}
	
	public function display($key, $required = false, $includeLabel = true) {
		if (is_object($key)) {
			$obj = $key;
		} else {
			$oclass = get_class($this->obj);
			switch($oclass) {
				case 'UserInfo':
					$class = 'UserAttributeKey';
					break;
				default:
					$class = $oclass . 'AttributeKey';
					break;
			}
			$obj = call_user_func(array($class, 'getByHandle'), $key);
		}
		
		if (!is_object($obj)) {
			return false;
		}
		
		if (is_object($this->obj)) {
			$value = $this->obj->getAttributeValueObject($obj);
		}
		$html = '<div class="clearfix">';
		if ($includeLabel) {
			$html .= $obj->render('label', false, true);
		}
		if ($required) {
			$html .= ' <span class="ccm-required">*</span>';
		}
		$html .= '<div class="input">';
		$html .= $obj->render('composer', $value, true);
			
		$html .= '</div></div>';
{'fraction_non_alphanumeric': 0.20485436893203884, 'fraction_numerical': 0.000970873786407767, 'mean_word_length': 3.3851063829787233, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 29, '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': '3734163', 'n_tokens_mistral': 862, 'n_tokens_neox': 722, 'n_words': 150}