<commit_before><?php

/*
 * This file is part of the CSBill package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace CSBill\QuoteBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\Form\Form;
use CSBill\QuoteBundle\Entity\Quote;
use CSBill\QuoteBundle\Form\EventListener\QuoteUsersSubscriber;

class QuoteType extends AbstractType
{
    /**
     * (non-PHPdoc)
     * @see Symfony\Component\Form.AbstractType::buildForm()
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('client', null, array('attr' => array('class' => 'chosen'), 'empty_value' => '--select--'));
        $builder->add('status', null, array('required' => true, 'empty_value' => '--select--'));
        $builder->add('discount', 'percent');
        $builder->add('items', 'collection', array('type' => new ItemType(),
                                                      'allow_add' => true,
                                                      'allow_delete' => true
                ));

        $builder->addEventSubscriber(new QuoteUsersSubscriber());
    }

    /**
     * (non-PHPdoc)
     * @see Symfony\Component\Form.FormTypeInterface::getName()
     */
    public function getName()
    {
        return 'quote';
    }

    /**
     * (non-PHPdoc)
     * @see Symfony\Component\Form.AbstractType::setDefaultOptions()
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {<commit_msg>[QuoteBundle] Remove quote status from form<commit_after><?php

/*
 * This file is part of the CSBill package.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace CSBill\QuoteBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\Form\Form;
use CSBill\QuoteBundle\Entity\Quote;
use CSBill\QuoteBundle\Form\EventListener\QuoteUsersSubscriber;

class QuoteType extends AbstractType
{
    /**
     * (non-PHPdoc)
     * @see Symfony\Component\Form.AbstractType::buildForm()
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('client', null, array('attr' => array('class' => 'chosen'), 'empty_value' => '--select--'));
        //$builder->add('status', null, array('required' => true, 'empty_value' => '--select--'));
        $builder->add('discount', 'percent');
        $builder->add('items', 'collection', array('type' => new ItemType(),
                                                      'allow_add' => true,
                                                      'allow_delete' => true
                ));

        $builder->addEventSubscriber(new QuoteUsersSubscriber());
    }

    /**
     * (non-PHPdoc)
     * @see Symfony\Component\Form.FormTypeInterface::getName()
     */
    public function getName()
    {
        return 'quote';
    }

    /**
     * (non-PHPdoc)
     * @see Symfony\Component\Form.AbstractType::setDefaultOptions()
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
{'fraction_non_alphanumeric': 0.1385057471264368, 'fraction_numerical': 0.0, 'mean_word_length': 2.711087420042644, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4034436', 'n_tokens_mistral': 961, 'n_tokens_neox': 944, 'n_words': 203}