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

FormInvalidMessage   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 13 1
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