Completed
Push — master ( 96bb84...2f170a )
by Tobias
04:46 queued 01:16
created

FormInvalidMessage::buildForm()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 10
nc 1
nop 2
1
<?php
2
3
namespace Translation\extractor\tests\Resources\Php\Symfony;
4
5
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
6
use Symfony\Component\Form\AbstractType;
7
use Symfony\Component\Form\FormBuilderInterface;
8
9
class FormInvalidMessage extends AbstractType
10
{
11
    public function buildForm(FormBuilderInterface $builder, array $options)
12
    {
13
        $builder->add('password', RepeatedType::class, array(
14
            'type' => 'password',
15
            'first_name' => 'new',
16
            'second_name' => 'confirm',
17
            'first_options' => array('label' => 'label.password.new'),
18
            'second_options' => array('label' => 'label.password.confirm'),
19
            'invalid_message' => 'password.not_match', // <--- This message
20
            'options' => array(),
21
            'required' => true,
22
        ));
23
    }
24
}
25