<commit_before><?php

namespace Reusables;
	


$options = Data::getValue( $viewdict, 'options' );
if( $options == "" ) {
	$options = [];
}

$is_smart = Data::getValue( $viewoptions, "is_smart" );

if( $is_smart == "" ) {
	$is_smart = true;
} else if( $is_smart == "0" ) {
	$is_smart = false;
}

$size = Data::getValue( $viewdict, "size" );

if( $size == "" ) {
	$size = "large";
}
$sizeclass = "size_" . $size;

$field_name = "fieldarray[" . Data::getValue( $viewdict, 'field_index') . "][field_value]";
$field_value = "{[]}";
if( !$is_smart ) {
	// $field_value = Data::getValue( $viewdict, 'field_value' );
	$field_name = Data::getValue( $viewdict, 'field_name' );
	if( $field_name == "" ) {
		$field_name = Data::getValue( $viewoptions, 'field_name' );
		if( $field_name == "" ) {
			$field_name = $identifier;
		}
	}
}

if( sizeof($viewdict) == 0 ) {
	$viewdict = [$identifier];
}
if( sizeof($options) == 0 ) {

	$options = [];
	foreach ($viewdict as $key => $value) {
	    if( !is_numeric($key) ) { break; }
	    if( !is_array($value) ) {
	        $title = $value;
	        // $value = ltrim($value, ' ');
	        // $value = rtrim($value, ' ');
	        $value = strtolower(str_replace(' ', '-', $value));
	        $value = ["title"=>$title, "value"=>$value];
	        array_push($options, $value);
	    } else {
	        array_push($options, $value);
	    }
	}
}

if( !isset($viewdict['field_conditions'] ) ){
	$viewdict['field_conditions'] = [];
}else if( $viewdict['field_conditions'] == "" ){
	$viewdict['field_conditions'] = [];
}

?>

<style><commit_msg>removed spaces and capitalized first letter when taking title from identifier in checkbox<commit_after><?php

namespace Reusables;
	


$options = Data::getValue( $viewdict, 'options' );
if( $options == "" ) {
	$options = [];
}

$is_smart = Data::getValue( $viewoptions, "is_smart" );

if( $is_smart == "" ) {
	$is_smart = true;
} else if( $is_smart == "0" ) {
	$is_smart = false;
}

$size = Data::getValue( $viewdict, "size" );

if( $size == "" ) {
	$size = "large";
}
$sizeclass = "size_" . $size;

$field_name = "fieldarray[" . Data::getValue( $viewdict, 'field_index') . "][field_value]";
$field_value = "{[]}";
if( !$is_smart ) {
	// $field_value = Data::getValue( $viewdict, 'field_value' );
	$field_name = Data::getValue( $viewdict, 'field_name' );
	if( $field_name == "" ) {
		$field_name = Data::getValue( $viewoptions, 'field_name' );
		if( $field_name == "" ) {
			$field_name = $identifier;
		}
	}
}

if( sizeof($viewdict) == 0 ) {
	$viewdict = [$identifier];
}
if( sizeof($options) == 0 ) {

	$options = [];
	foreach ($viewdict as $key => $value) {
	    if( !is_numeric($key) ) { break; }
	    if( !is_array($value) ) {
	        $title = $value;
	        // $value = ltrim($value, ' ');
	        // $value = rtrim($value, ' ');
	        $value = strtolower(str_replace(' ', '-', $value));
	        $value = ["title"=>ucfirst(str_replace("_", " ", $title)), "value"=>$value];
	        array_push($options, $value);
	    } else {
	        array_push($options, $value);
	    }
	}
}

if( !isset($viewdict['field_conditions'] ) ){
	$viewdict['field_conditions'] = [];
}else if( $viewdict['field_conditions'] == "" ){
	$viewdict['field_conditions'] = [];
}

?>

<style>
{'fraction_non_alphanumeric': 0.22763726095003084, 'fraction_numerical': 0.001850709438618137, 'mean_word_length': 3.6594827586206895, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '5686245', 'n_tokens_mistral': 1243, 'n_tokens_neox': 1198, 'n_words': 224}