<commit_before><?php

namespace TelegramBotAPI\Supports\Gson;


trait SerializableTrait {

    private function unCamelize($value) {

        $value = preg_replace('/[A-Z]/', ' ${0}', $value);
        $value = str_replace(' ', '_', $value);

        return strtolower($value);
    }


    public function jsonSerialize() {

        $props = (array) $this;
        //$props = array_filter($props);
        $json = array();

        foreach ($props as $key => $value) {

            if (substr($key, 1, 1) === '*') {
                $key = substr($key, 2);
            }

            $key = str_replace(get_called_class(), '', $key);
            $key = str_replace("\0", '', $key);

            $json[$this->unCamelize($key)] = $value;
        }

        unset($props);

        return $json;
    }
}
<commit_msg>delete commient<commit_after><?php

namespace TelegramBotAPI\Supports\Gson;


trait SerializableTrait {

    private function unCamelize($value) {

        $value = preg_replace('/[A-Z]/', ' ${0}', $value);
        $value = str_replace(' ', '_', $value);

        return strtolower($value);
    }


    public function jsonSerialize() {

        $props = (array) $this;
        $json = array();

        foreach ($props as $key => $value) {

            if (substr($key, 1, 1) === '*') {
                $key = substr($key, 2);
            }

            $key = str_replace(get_called_class(), '', $key);
            $key = str_replace("\0", '', $key);

            $json[$this->unCamelize($key)] = $value;
        }

        unset($props);

        return $json;
    }
}

{'fraction_non_alphanumeric': 0.1819330385344283, 'fraction_numerical': 0.006317119393556538, 'mean_word_length': 1.9607476635514018, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '1787090', 'n_tokens_mistral': 519, 'n_tokens_neox': 492, 'n_words': 99}