<commit_before><?php

class sfSympalAssetObject
{
  protected
    $_filePath,
    $_rootPath,
    $_name,
    $_size,
    $_icon,
    $_doctrineAsset,
    $_original,
    $_type = 'file';

  public function __construct($filePath)
  {
    $this->_filePath = $filePath;    
    $this->_rootPath = sfConfig::get('sf_web_dir').sfSympalConfig::get('assets', 'root_dir', '/uploads');

    if ($this->getTypeFromExtension() != $this->_type)
    {
      throw new sfException(sprintf('The file "%s" is not an image', $file));
    }
  }

  public function exists()
  {
    return file_exists($this->getPath());
  }

  public function getTypeFromExtension()
  {
    return sfSympalAssetToolkit::getTypeFromExtension($this->getExtension());
  }
<commit_msg>[1.4][sfSympalPlugin][1.0] Fixing issue with assets other than images and videos<commit_after><?php

class sfSympalAssetObject
{
  protected
    $_filePath,
    $_rootPath,
    $_name,
    $_size,
    $_icon,
    $_doctrineAsset,
    $_original,
    $_type = 'file';

  public function __construct($filePath)
  {
    $this->_filePath = $filePath;    
    $this->_rootPath = sfConfig::get('sf_web_dir').sfSympalConfig::get('assets', 'root_dir', '/uploads');

    if ($this->getTypeFromExtension() != $this->_type && $this->_type !== 'file')
    {
      throw new sfException(sprintf('The file "%s" is not a %s', $file, $this->_type));
    }
  }

  public function exists()
  {
    return file_exists($this->getPath());
  }

  public function getTypeFromExtension()
  {
    return sfSympalAssetToolkit::getTypeFromExtension($this->getExtension());
  }

{'fraction_non_alphanumeric': 0.15601503759398497, 'fraction_numerical': 0.002506265664160401, 'mean_word_length': 3.6832844574780057, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, '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': '2018480', 'n_tokens_mistral': 522, 'n_tokens_neox': 518, 'n_words': 102}