<commit_before><?php

$files = $argv;

if (count($files) != 4){
    throw new Exception(
        sprintf('Invalid arguments passed')
);
}

$default_php_fpm_ini = parse_ini_file($files[1], true);
$custom_php_fpm_ini = parse_ini_file($files[2], true);

$configuration = array_replace_recursive($default_php_fpm_ini, $custom_php_fpm_ini);

$content = '';
$sections = '';
$globals = '';
if (!empty($configuration)) {
    foreach ($configuration as $section => $item) {
        if (!is_array($item)) {
            $value = $item;
            $globals .= $section . ' = ' . $value . "\n";
        }
    }
    $content .= $globals;
    foreach ($configuration as $section => $item) {
        if (is_array($item)) {
            $sections .= "\n"
                        . "[" . $section . "]" . "\n";
            foreach ($item as $key => $value) {
                if (is_array($value)) {
                    foreach ($value as $arrkey => $arrvalue) {
                        //$arrvalue = $this->normalizeValue($arrvalue);
                        $arrkey = $key . '[' . $arrkey . ']';
                        $sections .= $arrkey . ' = ' . $arrvalue
                                    . "\n";
                    }<commit_msg>Raw scanner for ENV vars<commit_after><?php

$files = $argv;

if (count($files) != 4){
    throw new Exception(
        sprintf('Invalid arguments passed')
);
}

$default_php_fpm_ini = parse_ini_file($files[1], true, INI_SCANNER_RAW);
$custom_php_fpm_ini = parse_ini_file($files[2], true, INI_SCANNER_RAW);

$configuration = array_replace_recursive($default_php_fpm_ini, $custom_php_fpm_ini);

$content = '';
$sections = '';
$globals = '';
if (!empty($configuration)) {
    foreach ($configuration as $section => $item) {
        if (!is_array($item)) {
            $value = $item;
            $globals .= $section . ' = ' . $value . "\n";
        }
    }
    $content .= $globals;
    foreach ($configuration as $section => $item) {
        if (is_array($item)) {
            $sections .= "\n"
                        . "[" . $section . "]" . "\n";
            foreach ($item as $key => $value) {
                if (is_array($value)) {
                    foreach ($value as $arrkey => $arrvalue) {
                        //$arrvalue = $this->normalizeValue($arrvalue);
                        $arrkey = $key . '[' . $arrkey . ']';
                        $sections .= $arrkey . ' = ' . $arrvalue
                                    . "\n";
                    }
{'fraction_non_alphanumeric': 0.17142857142857143, 'fraction_numerical': 0.002414486921529175, 'mean_word_length': 1.7591564927857937, 'pattern_counts': {'":': 0, '<': 5, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5487882', 'n_tokens_mistral': 773, 'n_tokens_neox': 752, 'n_words': 152}