original_string: public static function detect_mime_type($path) {
  		$handle = finfo_open(FILEINFO_MIME);
  		$mime_type = finfo_file($handle, $path);
  
  		if (strpos($mime_type, ';')) {
  			$mime_type = preg_replace('/;.*/', ' ', $mime_type);
  		}
  
  		return trim($mime_type);
  	}
code: public static function detect_mime_type($path) {
  		$handle = finfo_open(FILEINFO_MIME);
  		$mime_type = finfo_file($handle, $path);
  
  		if (strpos($mime_type, ';')) {
  			$mime_type = preg_replace('/;.*/', ' ', $mime_type);
  		}
  
  		return trim($mime_type);
  	}
code_tokens: public static function detect_mime_type ( $ path ) { $ handle = finfo_open ( FILEINFO_MIME ) ; $ mime_type = finfo_file ( $ handle , $ path ) ; if ( strpos ( $ mime_type , ';' ) ) { $ mime_type = preg_replace ( '/;.*/' , ' ' , $ mime_type ) ; } return trim ( $ mime_type ) ; }
docstring: Get the mime_type of a file
  
  @access public
  @param string $file The path to the file
  @return string $mime_type
docstring_tokens: Get the mime_type of a file