<commit_before><?php
defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * Access multidimensional array
 *
 * @param   string
 * @return  mixed
 */
if ( ! function_exists('dot'))
{
    function dot(&$arr, $path = null, $default = null)
    {
        if ( ! $path)
        {
            user_error("Missing array path for array", E_USER_WARNING);
        }
        $parts = explode(".", $path);
        $path  =& $arr;
        foreach ($parts as $e)
        {
            if ( ! isset($path[$e]) or empty($path[$e]))
            {
                return $default;
            }
            $path =& $path[$e];
        }
        return $path;
    }
}

/* End of file dot-notation.php */
/* Location: ./system/vendor/dot-notation.php */<commit_msg>Fixing system/vendor/dot-notation.php to allow the use of both array and objects<commit_after><?php
defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * Access multidimensional array
 *
 * @param   string
 * @return  mixed
 */
if ( ! function_exists('dot'))
{
    function dot(&$arr, $path = null, $default = null)
    {
        if ( ! $path)
        {
            user_error("Missing array path for array", E_USER_WARNING);
        }
        $parts = explode(".", $path);
        is_array($arr) or $arr = (array) $arr;
        $path  =& $arr;
        foreach ($parts as $e)
        {
            if ( ! isset($path[$e]) or empty($path[$e]))
            {
                return $default;
            }
            $path =& $path[$e];
        }
        return $path;
    }
}

/* End of file dot-notation.php */
/* Location: ./system/vendor/dot-notation.php */
{'fraction_non_alphanumeric': 0.16017052375152252, 'fraction_numerical': 0.0, 'mean_word_length': 1.8673647469458987, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '3078958', 'n_tokens_mistral': 502, 'n_tokens_neox': 495, 'n_words': 127}