protected function determineFileType($path)
    {
        if (!function_exists('finfo_open')) {
            // File info functions not available
            return;
        }

        // Determine file type
        $finfo = finfo_open(\FILEINFO_MIME_TYPE);
        $type = finfo_file($finfo, $path);

        finfo_close($finfo);

        if ($type === false) {
            // Could not determine file type
            return;
        }

        return $type;
    }
protected function determineFileType($path)
    {
        if (!function_exists('finfo_open')) {
            
            return;
        }

        
        $finfo = finfo_open(\FILEINFO_MIME_TYPE);
        $type = finfo_file($finfo, $path);

        finfo_close($finfo);

        if ($type === false) {
            
            return;
        }

        return $type;
    }
protected function determineFileType ( $ path ) { if ( ! function_exists ( 'finfo_open' ) ) { // File info functions not available return ; } // Determine file type $ finfo = finfo_open ( \ FILEINFO_MIME_TYPE ) ; $ type = finfo_file ( $ finfo , $ path ) ; finfo_close ( $ finfo ) ; if ( $ type === false ) { // Could not determine file type return ; } return $ type ; }
@param string $path

@throws \RuntimeException

@return string
@param string $path