<commit_before><?php

namespace Kunstmaan\FormBundle\Form;

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

/**
 * This class represents the type for the ChoiceFormSubmissionField
 */
class ChoiceFormSubmissionType extends AbstractType
{

    /**
     * @var string
     */
    private $label;

    /**
     * @var bool
     */
    private $expanded;

    /**
     * @var bool
     */
    private $multiple;

    /**
     * @var array
     */
    private $choices;

    /**
     * @var array
     */
    private $emptyValue;

    /**
     * @param string $label      The label
     * @param bool   $expanded   Expanded or not
     * @param bool   $multiple   Multiple or not
     * @param array  $choices    The choices array
     * @param array  $emptyValue The empty value
     */
    public function __construct($label, $expanded, $multiple, array $choices, array $emptyValue = null)
    {
        $this->label = $label;
        $this->expanded = $expanded;
        $this->multiple = $multiple;
        $this->choices = $choices;
        $this->emptyValue = $emptyValue;
    }

    /**
     * @param FormBuilderInterface $builder The form builder
     * @param array                $options The options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('value', 'choice', array(
            'label' => $this->label,
            'expanded' => $this->expanded,
            'multiple' => $this->multiple,
            'choices' => $this->choices,
            'empty_value' => $this->emptyValue,
            'empty_data' => null
        ));
    }

    /**
     * @return string
     */
    public function getName()
    {
        return 'kunstmaan_formbundle_choiceformsubmissiontype';
    }
}<commit_msg>fix choice pagepart: symfony2.1 upgrade<commit_after><?php

namespace Kunstmaan\FormBundle\Form;

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

/**
 * This class represents the type for the ChoiceFormSubmissionField
 */
class ChoiceFormSubmissionType extends AbstractType
{

    /**
     * @var string
     */
    private $label;

    /**
     * @var bool
     */
    private $expanded;

    /**
     * @var bool
     */
    private $multiple;

    /**
     * @var array
     */
    private $choices;

    /**
     * @var string
     */
    private $emptyValue;

    /**
     * @param string $label      The label
     * @param bool   $expanded   Expanded or not
     * @param bool   $multiple   Multiple or not
     * @param array  $choices    The choices array
     * @param array  $emptyValue The empty value
     */
    public function __construct($label, $expanded, $multiple, array $choices, $emptyValue = null)
    {
        $this->label = $label;
        $this->expanded = $expanded;
        $this->multiple = $multiple;
        $this->choices = $choices;
        $this->emptyValue = $emptyValue;
    }

    /**
     * @param FormBuilderInterface $builder The form builder
     * @param array                $options The options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('value', 'choice', array(
            'label' => $this->label,
            'expanded' => $this->expanded,
            'multiple' => $this->multiple,
            'choices' => $this->choices,
            'empty_value' => $this->emptyValue,
            'empty_data' => null
        ));
    }

    /**
     * @return string
     */
    public function getName()
    {
        return 'kunstmaan_formbundle_choiceformsubmissiontype';
    }

    /**
     * @param array $options
     *
     * @return array
     */
    public function getDefaultOptions(array $options)
    {
        return array(
                'data_class' => 'Kunstmaan\FormBundle\Entity\FormSubmissionFieldTypes\ChoiceFormSubmissionField',
        );
    }
}
{'fraction_non_alphanumeric': 0.1217524197656648, 'fraction_numerical': 0.0005094243504839531, 'mean_word_length': 2.058411214953271, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 38, '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': '12342', 'n_tokens_mistral': 1150, 'n_tokens_neox': 1135, 'n_words': 270}