<commit_before><?php

/**
 * File
 *
 * Methods for reading/writing files.
 *
 * @author <NAME> <<EMAIL>>
 */
class File
{
    /**
     * Load and decode JSON data.
     */
    public static function jsonFileToArray($file)
    {
        $json = file_get_contents($file);

        return json_decode($json, true);
    }

    /**
     * Write a full path from a list of parts
     */
    public static function path()
    {
        $path = '';

        foreach (func_get_args() as $key => $p) {
            if ($key == 0) {
                $path .= rtrim($p, '/') . '/';
            } else {
                $path .= trim($p, '/') . '/';
            }
        }

        return rtrim($path, '/');
    }

}
<commit_msg>Update File class<commit_after><?php

/**
 * File
 *
 * Methods for reading/writing files.
 *
 * @author <NAME> <<EMAIL>>
 */
class File
{
    /**
     * Write a full path from a list of parts
     */
    public static function path()
    {
        $path = '';

        foreach (func_get_args() as $key => $p) {
            if ($key == 0) {
                $path .= rtrim($p, '/') . '/';
            } else {
                $path .= trim($p, '/') . '/';
            }
        }

        return rtrim($path, '/');
    }

}

{'fraction_non_alphanumeric': 0.17675544794188863, 'fraction_numerical': 0.0016142050040355124, 'mean_word_length': 1.393822393822394, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '2041932', 'n_tokens_mistral': 402, 'n_tokens_neox': 389, 'n_words': 96}