<commit_before><?php


class popoon_helpers_mimetypes {
    
    
    function getFromFileLocation($src) {
        $extension = substr($src,strrpos($src,".")+1);
        
        switch ($extension) {
            case "gif":
            return "image/gif";
            case "jpg":
            case "jpeg":
            return "image/jpeg";
            case "png":
            return "image/png";
            case "css":
            return "text/css";
            case "xml":
            case "xsl":
            case "xsd":
            case "rng":
            case "tal":
            return "text/xml";
            case "js":
            return "text/javascript";
            case "html":
            case "htm":
            case "xhtml":
            return "text/html";
            case "txt":
            return "text/plain";
            case "pdf":
            return "application/pdf";
            
            default:<commit_msg>this method should be static<commit_after><?php


class popoon_helpers_mimetypes {
    
    
    static function getFromFileLocation($src) {
        $extension = substr($src,strrpos($src,".")+1);
        
        switch ($extension) {
            case "gif":
            return "image/gif";
            case "jpg":
            case "jpeg":
            return "image/jpeg";
            case "png":
            return "image/png";
            case "css":
            return "text/css";
            case "xml":
            case "xsl":
            case "xsd":
            case "rng":
            case "tal":
            return "text/xml";
            case "js":
            return "text/javascript";
            case "html":
            case "htm":
            case "xhtml":
            return "text/html";
            case "txt":
            return "text/plain";
            case "pdf":
            return "application/pdf";
            
            default:
{'fraction_non_alphanumeric': 0.12076271186440678, 'fraction_numerical': 0.001059322033898305, 'mean_word_length': 1.1368778280542986, 'pattern_counts': {'":': 32, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '2319183', 'n_tokens_mistral': 498, 'n_tokens_neox': 489, 'n_words': 124}