<commit_before><?php


namespace OCA\CameraRawPreviews;

use OCP\Preview\IProvider;


class CameraRaw
{
    /**
     * @var array an array containing popular raw file format extensions
     */
    private static $rawExtensions = array('.ari','.arw','.bay','.crw','.cr2','.cap','.dcs','.dcr','.dng','.drf','.eip','.erf','.fff','.iiq','.k25','.kdc','.mdc','.mef','.mos','.mrw','.nef','.nrw','.obm','.orf','.pef','.ptx','.pxn','.r3d','.raf','.raw','.rwl','.rw2','.rwz','.sr2','.srf','.srw', '.x3f');
    /**
     * Checks if a file exists based on the filepath.
     *
     * @param string $filePath the path to the file
     *
     * @return bool returns true if the file exists
     */
    private static function checkFile($filePath)
    {
        if (file_exists($filePath)) {
            return true;
        }
        return false;
    }
    /**
     * Checks if a file is a raw file based on file extension.
     *
     * @param string $filePath the path to the file
     *
     * @return bool returns true if the file is a raw type
     */
    public static function isRawFile($filePath)<commit_msg>Add credit for use of class<commit_after><?php


namespace OCA\CameraRawPreviews;

use OCP\Preview\IProvider;


// CameraRaw class: https://github.com/beije/php-camera-raw

class CameraRaw
{
    /**
     * @var array an array containing popular raw file format extensions
     */
    private static $rawExtensions = array('.ari','.arw','.bay','.crw','.cr2','.cap','.dcs','.dcr','.dng','.drf','.eip','.erf','.fff','.iiq','.k25','.kdc','.mdc','.mef','.mos','.mrw','.nef','.nrw','.obm','.orf','.pef','.ptx','.pxn','.r3d','.raf','.raw','.rwl','.rw2','.rwz','.sr2','.srf','.srw', '.x3f');
    /**
     * Checks if a file exists based on the filepath.
     *
     * @param string $filePath the path to the file
     *
     * @return bool returns true if the file exists
     */
    private static function checkFile($filePath)
    {
        if (file_exists($filePath)) {
            return true;
        }
        return false;
    }
    /**
     * Checks if a file is a raw file based on file extension.
     *
     * @param string $filePath the path to the file
     *
     * @return bool returns true if the file is a raw type
     */
    public static function isRawFile($filePath)
{'fraction_non_alphanumeric': 0.19316688567674112, 'fraction_numerical': 0.006132282084975909, 'mean_word_length': 2.6253968253968254, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '3729518', 'n_tokens_mistral': 783, 'n_tokens_neox': 775, 'n_words': 191}