<commit_before><?php
/** This file is part of load.link (https://github.com/deuiore/load.link).
 * View the LICENSE file for full license information.
 **/

class Utils
{
    public static function detectMime($path, $ext = '')
    {
        switch ($ext)
        {
            case 'css':
                return 'text/css';
            case 'js':
                return 'application/javascript';
            case 'opus':
                return 'audio/opus';
        }

        $finfo = finfo_open(FILEINFO_MIME_TYPE);
        $mime = finfo_file($finfo, $path);
        finfo_close($finfo);

        return $mime;
    }
<commit_msg>utils: Change opus media type to 'audio/ogg; codecs=opus'<commit_after><?php
/** This file is part of load.link (https://github.com/deuiore/load.link).
 * View the LICENSE file for full license information.
 **/

class Utils
{
    public static function detectMime($path, $ext = '')
    {
        switch ($ext)
        {
            case 'css':
                return 'text/css';
            case 'js':
                return 'application/javascript';
            case 'opus':
                return 'audio/ogg; codecs=opus';
        }

        $finfo = finfo_open(FILEINFO_MIME_TYPE);
        $mime = finfo_file($finfo, $path);
        finfo_close($finfo);

        return $mime;
    }

{'fraction_non_alphanumeric': 0.1274658573596358, 'fraction_numerical': 0.0, 'mean_word_length': 1.8304721030042919, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '7403908', 'n_tokens_mistral': 406, 'n_tokens_neox': 388, 'n_words': 98}