<commit_before><?php

declare(strict_types=1);

use Illuminate\Support\Str;

if (! function_exists('extract_title')) {
    /**
     * Extract page title from breadcrumbs.
     *
     * @param mixed $breadcrumbs
     *
     * @return string
     */
    function extract_title($breadcrumbs, string $separator = ' » ')
    {
        return Str::afterLast(preg_replace('/[\n\r\s]+/', ' ', strip_tags(Str::replaceLast($separator, '', str_replace('</li>', $separator, (string) $breadcrumbs)))), $separator)." {$separator} ".config('app.name');
    }
}

if (! function_exists('domain')) {
    /**
     * Return domain host.
     *
     * @return string
     */
    function domain()
    {
        return parse_url(config('app.url'))['host'];
    }
}

if (! function_exists('route_prefix')) {
    /**
     * Return route prefix.
     *
     * @param mixed $accessarea
     *
     * @return string
     */
    function route_prefix($accessarea)
    {<commit_msg>Remove no longer used domain() global helper - This is now the responsibility of rinvex/laravel-tenants<commit_after><?php

declare(strict_types=1);

use Illuminate\Support\Str;

if (! function_exists('extract_title')) {
    /**
     * Extract page title from breadcrumbs.
     *
     * @param mixed $breadcrumbs
     *
     * @return string
     */
    function extract_title($breadcrumbs, string $separator = ' » ')
    {
        return Str::afterLast(preg_replace('/[\n\r\s]+/', ' ', strip_tags(Str::replaceLast($separator, '', str_replace('</li>', $separator, (string) $breadcrumbs)))), $separator)." {$separator} ".config('app.name');
    }
}

if (! function_exists('route_prefix')) {
    /**
     * Return route prefix.
     *
     * @param mixed $accessarea
     *
     * @return string
     */
    function route_prefix($accessarea)
    {
{'fraction_non_alphanumeric': 0.1678710394663702, 'fraction_numerical': 0.0011117287381878821, 'mean_word_length': 2.896103896103896, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4857537', 'n_tokens_mistral': 571, 'n_tokens_neox': 569, 'n_words': 110}