<commit_before><?php

namespace AppBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Form\FormInterface;

class ReportDeclarationType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
                ->add('id', 'hidden')
                ->add('agree', 'checkbox', [
                     'constraints' => new NotBlank(['message' => 'report-declaration.agree.notBlank']),
                 ])
                 ->add('agreedBehalfDeputy', 'choice', array(
                    'choices' => [
                        // api models contains those keys too. Change them accordingly if needed
                        'only_deputy' => 'I am the only deputy',
                        'more_deputies_behalf' => 'There is more than one deputy, and I’m signing on everyone’s behalf',
                        'more_deputies_not_behalf' => 'There is more than one deputy, but I’m not signing on everyone’s behalf',
                    ],
                    'expanded' => true,
                ))
                ->add('agreedBehalfDeputyExplanation', 'textarea')
                ->add('save', 'submit');
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {<commit_msg>dd-1433 submission form uses translations<commit_after><?php

namespace AppBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Form\FormInterface;

class ReportDeclarationType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
                ->add('id', 'hidden')
                ->add('agree', 'checkbox', [
                     'constraints' => new NotBlank(['message' => 'report-declaration.agree.notBlank']),
                 ])
                 ->add('agreedBehalfDeputy', 'choice', array(
                    'choices' => [
                        // api models contains those keys too. Change them accordingly if needed
                        'only_deputy' => 'agreedBehalfDeputy.only_deputy',
                        'more_deputies_behalf' => 'agreedBehalfDeputy.more_deputies_behalf',
                        'more_deputies_not_behalf' => 'agreedBehalfDeputy.more_deputies_not_behalf',
                    ],
                    'choice_translation_domain' => 'report-declaration',
                    'translation_domain' => 'report-declaration',
                    'expanded' => true,
                ))
                ->add('agreedBehalfDeputyExplanation', 'textarea')
                ->add('save', 'submit');
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
{'fraction_non_alphanumeric': 0.10557571758495546, 'fraction_numerical': 0.0013196964698119432, 'mean_word_length': 2.211864406779661, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '4322963', 'n_tokens_mistral': 801, 'n_tokens_neox': 751, 'n_words': 161}