<commit_before><?php
class EnumDataType extends DataType {
  
  private $class = null;
  private $values;
  
  protected function __construct($valuesOrClass, $null = false, $default = null) {
    parent::__construct(DataType::ENUM, $null, $default);
    if (is_array($valuesOrClass)) {
      $this->values = $valuesOrClass;
    }
    else { 
      $this->class = $valuesOrClass;
      $this->values = Enum::getValues($this->class);
    }
    if (isset($default) and !in_array($default, $this->values)) {
      throw new InvalidArgumentException(tr(
        'Default value must be part of enum'
      ));
    }
  }

  public function __get($property) {
    if ($property == 'values')
      return $this->values;
    if ($property == 'placeholder')
      if (!isset($this->class))
        throw new Exception(tr('Invalid use of anonymous enum type'));
      return '%' . $this->class;<commit_msg>I made an Apple...<commit_after><?php
class EnumDataType extends DataType {
  
  private $class = null;
  private $values;
  
  protected function __construct($valuesOrClass, $null = false, $default = null) {
    parent::__construct(DataType::ENUM, $null, $default);
    if (is_array($valuesOrClass)) {
      $this->values = $valuesOrClass;
    }
    else { 
      $this->class = $valuesOrClass;
      $this->values = Enum::getValues($this->class);
    }
    if (isset($default) and !in_array($default, $this->values)) {
      throw new InvalidArgumentException(tr(
        'Default value must be part of enum'
      ));
    }
  }

  public function __get($property) {
    if ($property === 'values')
      return $this->values;
    if ($property === 'placeholder') {
      if (!isset($this->class))
        throw new Exception(tr('Invalid use of anonymous enum type'));
      return '%' . $this->class;
    }
{'fraction_non_alphanumeric': 0.15141430948419302, 'fraction_numerical': 0.0, 'mean_word_length': 3.090702947845805, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '2626814', 'n_tokens_mistral': 535, 'n_tokens_neox': 535, 'n_words': 136}