<commit_before><?php

class EditionRevendicationForm extends sfForm {

    protected $_choices_produits;
    protected $revendication;
    protected $identifiant;
    protected $row;
    protected $produit_hash;
    protected $volume;
    protected $num_ligne;
    protected $code_douane;
    protected $date;

    public function __construct(stdClass $revendication, $identifiant, $produit, $row, $defaults = array(), $options = array(), $CSRFSecret = null) {
        parent::__construct($defaults, $options, $CSRFSecret);
        $this->revendication = $revendication;
        $this->date = ConfigurationClient::getInstance()->getDateDebutCampagne($revendication->campagne);
        if (isset($identifiant) && isset($produit) && isset($row)) {
            $this->initFields($identifiant, $produit, $row);
            $this->setDefaults($defaults);
        }
    }

    public function configure() {
        parent::configure();
        $this->setWidget('produit_hash', new sfWidgetFormChoice(array('choices' => $this->getProduits()), array('class' => 'autocomplete')));
        $this->setWidget('volume', new sfWidgetFormInput());
        $this->setValidator('produit_hash', new sfValidatorChoice(array('required' => true, 'choices' => array_keys($this->getProduits()))));
        $this->setValidator('volume', new sfValidatorNumber(array('required' => true)));
        $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
        $this->widgetSchema->setNameFormat('revendication_edition_row[%s]');<commit_msg>Insure that we always have access to the revendication object<commit_after><?php

class EditionRevendicationForm extends sfForm {

    protected $_choices_produits;
    protected $revendication;
    protected $identifiant;
    protected $row;
    protected $produit_hash;
    protected $volume;
    protected $num_ligne;
    protected $code_douane;
    protected $date;

    public function __construct(stdClass $revendication, $identifiant, $produit, $row, $defaults = array(), $options = array(), $CSRFSecret = null) {
        $this->revendication = $revendication;
        $this->date = ConfigurationClient::getInstance()->getDateDebutCampagne($revendication->campagne);
        parent::__construct($defaults, $options, $CSRFSecret);
        if (isset($identifiant) && isset($produit) && isset($row)) {
            $this->initFields($identifiant, $produit, $row);
            $this->setDefaults($defaults);
        }
    }

    public function configure() {
        parent::configure();
        $this->setWidget('produit_hash', new sfWidgetFormChoice(array('choices' => $this->getProduits()), array('class' => 'autocomplete')));
        $this->setWidget('volume', new sfWidgetFormInput());
        $this->setValidator('produit_hash', new sfValidatorChoice(array('required' => true, 'choices' => array_keys($this->getProduits()))));
        $this->setValidator('volume', new sfValidatorNumber(array('required' => true)));
        $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
        $this->widgetSchema->setNameFormat('revendication_edition_row[%s]');
{'fraction_non_alphanumeric': 0.15028901734104047, 'fraction_numerical': 0.0, 'mean_word_length': 4.389273356401384, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 45, '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': '1569691', 'n_tokens_mistral': 883, 'n_tokens_neox': 880, 'n_words': 164}