<commit_before><?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of class DSValidationCiva
 * @author mathurin
 */
class DSValidationCiva  extends DSValidation
{
  public function configure() {
      
    $this->addControle('vigilance', 'stock_null_appellation', acCouchdbManager::getClient('Messages')->getMessage('stock_null_appellation'));
    $this->addControle('vigilance', 'stock_zero_appellation', acCouchdbManager::getClient('Messages')->getMessage('stock_zero_appellation'));
    
    $this->addControle('vigilance', 'stock_null_lieu', acCouchdbManager::getClient('Messages')->getMessage('stock_null_lieu'));
    $this->addControle('vigilance', 'stock_zero_lieu', acCouchdbManager::getClient('Messages')->getMessage('stock_zero_lieu'));
    
    $this->addControle('vigilance', 'stock_null_cepage', acCouchdbManager::getClient('Messages')->getMessage('stock_null_cepage'));
    $this->addControle('vigilance', 'stock_zero_cepage', acCouchdbManager::getClient('Messages')->getMessage('stock_zero_cepage'));
    
    $this->addControle('erreur', 'autres_nul', acCouchdbManager::getClient('Messages')->getMessage('autres_nul'));
    $this->addControle('erreur', 'ds_autres_nul_principale', acCouchdbManager::getClient('Messages')->getMessage('ds_autres_nul_principale'));
  }

  public function controle()
  {
      var_dump($this->document->isDsPrincipale() && !$this->document->isDsNeant() && $this->document->hasNoAppellation());
            foreach($this->document->declaration->getAppellations() as $hash => $appellation) {
                    $appellation_vigilence = false;
                    if(!$appellation->total_stock){
                        $this->addPoint('vigilance', 'stock_null_appellation',' '.$appellation->getLibelle(), $this->generateUrl('ds_edition_operateur', array('id' => $this->document->_id, 'hash' => preg_replace("/^appellation_/", '', $hash)))); 
                        $appellation_vigilence = true;
                    }
                    if(!$appellation_vigilence){
                        foreach($appellation->getLieux() as $hash_lieu => $lieu) {
                            $lieu_vigilence = false;
                            if($hash_lieu!='lieu'){
                                if(!$lieu->total_stock){<commit_msg>Suppression d'un var_dump<commit_after><?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of class DSValidationCiva
 * @author mathurin
 */
class DSValidationCiva  extends DSValidation
{
  public function configure() {
      
    $this->addControle('vigilance', 'stock_null_appellation', acCouchdbManager::getClient('Messages')->getMessage('stock_null_appellation'));
    $this->addControle('vigilance', 'stock_zero_appellation', acCouchdbManager::getClient('Messages')->getMessage('stock_zero_appellation'));
    
    $this->addControle('vigilance', 'stock_null_lieu', acCouchdbManager::getClient('Messages')->getMessage('stock_null_lieu'));
    $this->addControle('vigilance', 'stock_zero_lieu', acCouchdbManager::getClient('Messages')->getMessage('stock_zero_lieu'));
    
    $this->addControle('vigilance', 'stock_null_cepage', acCouchdbManager::getClient('Messages')->getMessage('stock_null_cepage'));
    $this->addControle('vigilance', 'stock_zero_cepage', acCouchdbManager::getClient('Messages')->getMessage('stock_zero_cepage'));
    
    $this->addControle('erreur', 'autres_nul', acCouchdbManager::getClient('Messages')->getMessage('autres_nul'));
    $this->addControle('erreur', 'ds_autres_nul_principale', acCouchdbManager::getClient('Messages')->getMessage('ds_autres_nul_principale'));
  }

  public function controle()
  {
            foreach($this->document->declaration->getAppellations() as $hash => $appellation) {
                    $appellation_vigilence = false;
                    if(!$appellation->total_stock){
                        $this->addPoint('vigilance', 'stock_null_appellation',' '.$appellation->getLibelle(), $this->generateUrl('ds_edition_operateur', array('id' => $this->document->_id, 'hash' => preg_replace("/^appellation_/", '', $hash)))); 
                        $appellation_vigilence = true;
                    }
                    if(!$appellation_vigilence){
                        foreach($appellation->getLieux() as $hash_lieu => $lieu) {
                            $lieu_vigilence = false;
                            if($hash_lieu!='lieu'){
                                if(!$lieu->total_stock){
{'fraction_non_alphanumeric': 0.15680279537016817, 'fraction_numerical': 0.0, 'mean_word_length': 3.8210526315789473, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 71, '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': '1660303', 'n_tokens_mistral': 1400, 'n_tokens_neox': 1368, 'n_words': 168}