RegistrationType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
B buildForm() 0 32 1
1
<?php
2
3
namespace FOS\UserBundle\Form\Type;
4
5
use Symfony\Component\Form\FormBuilderInterface;
6
7
/** {@inheritDoc} */
8
class RegistrationType extends RegistrationFormType
9
{
10
11
    /** {@inheritDoc} */
12
    public function buildForm(FormBuilderInterface $builder, array $options)
13
    {
14
        $builder->add(
15
            'email',
16
            'email',
17
            [
18
                'label'              => 'form.email',
19
                'translation_domain' => 'FOSUserBundle',
20
            ]
21
        );
22
23
        $builder->add(
24
            'username',
25
            null,
26
            [
27
                'label'              => 'form.username',
28
                'translation_domain' => 'FOSUserBundle',
29
            ]
30
        );
31
32
        $builder->add(
33
            'plainPassword',
34
            'repeated',
35
            [
36
                'type'            => 'password',
37
                'options'         => ['translation_domain' => 'FOSUserBundle'],
38
                'first_options'   => ['label' => 'form.password'],
39
                'second_options'  => ['label' => 'form.password_confirmation'],
40
                'invalid_message' => 'fos_user.password.mismatch',
41
            ]
42
        );
43
    }
44
}
45