<commit_before><?php

class ValidatorImportCsv extends sfValidatorFile
{
  protected function configure($options = array(), $messages = array())
  {
    $this->addRequiredOption('file_path');
    $this->addMessage('invalid_file', "Le fichier fourni ne peut être lu");
    $options['required'] = true;
    parent::configure($options, $messages);
    $this->setMessage('mime_types', "Le fichier fourni doit être un CSV");
    $this->options['mime_types'] = array('text/plain', 'text/csv','text/comma-separated-values','application/csv');

  }

  protected function doClean($value)
  { 
	parent::doClean($value);
    $csvValidated = new CsvValidatedFile($value['name'], 'text/csv', $value['tmp_name'], $value['size'], $this->getOption('file_path'));
    <commit_msg>ajout d'un mime dans le validator d'import fichier csv<commit_after><?php

class ValidatorImportCsv extends sfValidatorFile
{
  protected function configure($options = array(), $messages = array())
  {
    $this->addRequiredOption('file_path');
    $this->addMessage('invalid_file', "Le fichier fourni ne peut être lu");
    $options['required'] = true;
    parent::configure($options, $messages);
    $this->setMessage('mime_types', "Le fichier fourni doit être un CSV");
    $this->options['mime_types'] = array('text/plain', 'text/csv','text/comma-separated-values','application/csv', 'application/octet-stream');

  }

  protected function doClean($value)
  { 
	parent::doClean($value);
    $csvValidated = new CsvValidatedFile($value['name'], 'text/csv', $value['tmp_name'], $value['size'], $this->getOption('file_path'));
    
{'fraction_non_alphanumeric': 0.17492163009404388, 'fraction_numerical': 0.0, 'mean_word_length': 5.65, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '6027189', 'n_tokens_mistral': 501, 'n_tokens_neox': 487, 'n_words': 101}