<commit_before><?php

if (! function_exists('user_friendly_password')) {
    /**
     * Generate a user friendly password
     *
     * @param int $length
     * @param bool $add_dashes
     * @param string $available_sets
     * @return string new password
     */
    function user_friendly_password($length = 9, $add_dashes = false, $available_sets = 'lud')
    {
        return \DALTCORE\Helpers\Text::userFriendlyPassword($length, $add_dashes, $available_sets);
    }
}

if (! function_exists('route_name')) {
    /**
     * Get route name from URI
     *
     * @param null $uri
     * @return string route name
     */
    function route_name($uri = null)
    {
        return \DALTCORE\Helpers\Route::getRouteNameByUri($uri);
    }
}

if (!function_exists('activeRoute')) {
    /**
     * Check if the given route name(s) is or are the same as the current route
     *
     * @param  mixed $array
     * @return boolean
     */
    function activeRoute($array)
    {
        (is_array($array)) ? $routes = $array : $routes = func_get_args();

        return \DALTCORE\Helpers\Route::isActiveRoute($routes);
    }
}

if (!function_exists('active_route')) {
    /**
     * Check if the given route name is the same as the current route
     * based on wildcards
     *
     * @param  mixed $array
     * @return boolean
     */
    function active_route($routeName)
    {
        return \DALTCORE\Helpers\Route::isRouteActive($routeName);<commit_msg>Create helpers.php<commit_after><?php

if (! function_exists('user_friendly_password')) {
    /**
     * Generate a user friendly password
     *
     * @param int $length
     * @param bool $add_dashes
     * @param string $available_sets
     * @return string new password
     */
    function user_friendly_password($length = 9, $add_dashes = false, $available_sets = 'lud')
    {
        return \DALTCORE\Helpers\Text::userFriendlyPassword($length, $add_dashes, $available_sets);
    }
}

if (! function_exists('route_name')) {
    /**
     * Get route name from URI
     *
     * @param null $uri
     * @return string route name
     */
    function route_name($uri = null)
    {
        return \DALTCORE\Helpers\Route::getRouteNameByUri($uri);
    }
}

if (!function_exists('activeRoute')) {
    /**
     * Check if the given route name(s) is or are the same as the current route
     *
     * @param  mixed $array
     * @return boolean
     * @depricated v1.0.1 use active_route()
     */
    function activeRoute($array)
    {
        (is_array($array)) ? $routes = $array : $routes = func_get_args();

        return \DALTCORE\Helpers\Route::isActiveRoute($routes);
    }
}

if (!function_exists('active_route')) {
    /**
     * Check if the given route name is the same as the current route
     * based on wildcards
     *
     * @param  mixed $array
     * @return boolean
     */
    function active_route($routeName)
    {
        return \DALTCORE\Helpers\Route::isRouteActive($routeName);
{'fraction_non_alphanumeric': 0.12457798784604997, 'fraction_numerical': 0.001688048615800135, 'mean_word_length': 2.6266829865361077, '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': '3167571', 'n_tokens_mistral': 913, 'n_tokens_neox': 924, 'n_words': 222}