<commit_before><?php
declare(strict_types=1);

namespace MerchantSafeUnipay;

function filter(array $filterKeys, array $arrayData)
{
    $filteredData = [];
    foreach ($arrayData as $key => $value) {
        if (in_array($key, $filterKeys, true)) {
            $filteredData[$key] = $value;
        }
    }
    return $filteredData;
}

function convertCamelCase(string $str, string $separator = '_')
{
    return preg_replace_callback(
        '/[A-Z]/',
        function ($match) use ($separator) {
            return $separator.strtolower($match[0]);
        },
        $str
    );
}<commit_msg>convertCamelCase function fixed for separator [skip ci]<commit_after><?php
declare(strict_types=1);

namespace MerchantSafeUnipay;

function filter(array $filterKeys, array $arrayData)
{
    $filteredData = [];
    foreach ($arrayData as $key => $value) {
        if (in_array($key, $filterKeys, true)) {
            $filteredData[$key] = $value;
        }
    }
    return $filteredData;
}

function convertCamelCase(string $str, string $separator = '_')
{
    return trim(preg_replace_callback(
        '/[A-Z]/',
        function ($match) use ($separator) {
            return $separator.strtolower($match[0]);
        },
        $str
    ), $separator);
}
{'fraction_non_alphanumeric': 0.14626391096979333, 'fraction_numerical': 0.003179650238473768, 'mean_word_length': 2.909937888198758, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5786193', 'n_tokens_mistral': 403, 'n_tokens_neox': 387, 'n_words': 83}