<commit_before><?php

class ModuleRenderer {
  public $type = null;
  public $data = null;

  public function __construct($type, $data, $page){
    $this->type = $type;
    $this->data = new stdClass();

    foreach($data as $k => $v){
      if($k === 'options') {
        $this->options($page, $v);
      } else {
        $this->data->$k = new Field($page, $k, $v);
      }
    }

    $this->page = $page;
  }

  public function options($page, $options) {
    $this->data->options = new stdClass();

    foreach($options as $k => $v) {<commit_msg>Use new Obj instead of stdClass to more closely mirror Kirby's API<commit_after><?php

class ModuleRenderer {
  public $type = null;
  public $data = null;

  public function __construct($type, $data, $page){
    $this->type = $type;
    $this->data = new Obj();

    foreach($data as $k => $v){
      if($k === 'options') {
        $this->options($page, $v);
      } else {
        $this->data->$k = new Field($page, $k, $v);
      }
    }

    $this->page = $page;
  }

  public function options($page, $options) {
    $this->data->options = new stdClass();

    foreach($options as $k => $v) {
{'fraction_non_alphanumeric': 0.1896853146853147, 'fraction_numerical': 0.0, 'mean_word_length': 2.6698717948717947, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, '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': '2107030', 'n_tokens_mistral': 395, 'n_tokens_neox': 384, 'n_words': 103}