<commit_before><?php

namespace Dzangocart\Bundle\DzangocartBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class SaleFilterType extends AbstractType
{
    protected $options = array();

    public function __construct(array $options = array())
    {
        $this->options = $options;
    }

    public function getDateFormat()
    {
        return @$this->options['date_format'];
    }

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('date_from', 'date', array(
            'format' => 'yyyy-MM-dd',
            'label' => 'dzangocart.sales.filters.date_from',
            'widget' => 'single_text',
            'widget_control_group_attr' => array(
                'class' => 'date'
            ),
            'attr' => array(
                'class' => 'date_from'
            )
        ));
        $builder->add('date_to', 'date', array(
            'format' => 'yyyy-MM-dd',
            'label' => 'dzangocart.sales.filters.date_to',
            'widget' => 'single_text',
            'widget_control_group_attr' => array(
                'class' => 'date'
            ),
            'attr' => array(
                'class' => 'date_to'
            )
        ));

        $builder->add('date_range', 'text', array(
            'attr' => array(
                'class' => 'input-xlarge period'
            ),
            'label' => 'dzangocart.sales.filters.period'
        ));

        $builder->add('test', 'checkbox', array(
            'label' => 'dzangocart.sales.filters.test',
            'label_render' => true,
            'widget_checkbox_label' => 'widget',
            'widget_control_group_attr' => array(
                'class' => 'test'
            ),
            'widget_type' => 'inline'
        ));<commit_msg>refactored saleFiltertype<commit_after><?php

namespace Dzangocart\Bundle\DzangocartBundle\Form\Type;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class SaleFilterType extends AbstractType
{
    protected $options = array();

    public function __construct(array $options = array())
    {
        $this->options = $options;
    }

    public function getDateFormat()
    {
        return @$this->options['date_format'];
    }

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('date_from', 'date', array(
            'format' => 'yyyy-MM-dd',
            'label' => 'dzangocart.sales.filters.date_from',
            'widget' => 'single_text',
//            'widget_control_group_attr' => array(
//                'class' => 'date'
//            ),
            'attr' => array(
                'class' => 'date_from form-control'
            )
        ));
        $builder->add('date_to', 'date', array(
            'format' => 'yyyy-MM-dd',
            'label' => 'dzangocart.sales.filters.date_to',
            'widget' => 'single_text',
//            'widget_control_group_attr' => array(
//                'class' => 'date'
//            ),
            'attr' => array(
                'class' => 'date_to form-control'
            )
        ));

        $builder->add('date_range', 'text', array(
            'attr' => array(
                'class' => 'input-xlarge period form-control'
            ),
            'label' => 'dzangocart.sales.filters.period'
        ));

        $builder->add('test', 'checkbox', array(
            'label' => 'dzangocart.sales.filters.test',
//            'label_render' => true,
//            'widget_checkbox_label' => 'widget',
//            'widget_control_group_attr' => array(
//                'class' => 'test'
//            ),
//            'widget_type' => 'inline'
            'attr' => array(
                'class' => 'checkbox'
            ),
        ));
{'fraction_non_alphanumeric': 0.15168961201501877, 'fraction_numerical': 0.0, 'mean_word_length': 1.8320340184266477, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 63, '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': '2984536', 'n_tokens_mistral': 1170, 'n_tokens_neox': 1136, 'n_words': 194}