GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — develop ( f799d7...e8545c )
by Borut
14:35
created

SettingsType::buildForm()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 4
Bugs 1 Features 0
Metric Value
c 4
b 1
f 0
dl 0
loc 22
rs 9.2
cc 1
eloc 13
nc 1
nop 2
1
<?php
2
3
namespace Application\Form\Type\User;
4
5
use Symfony\Component\Form\AbstractType;
6
use Symfony\Component\Form\FormBuilderInterface;
7
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
8
use Application\Form\Type\ProfileType;
9
10
/**
11
 * @author Borut Balažek <[email protected]>
12
 */
13
class SettingsType extends AbstractType
14
{
15
    /**
16
     * @param FormBuilderInterface $builder
17
     * @param $options
18
     */
19
    public function buildForm(FormBuilderInterface $builder, array $options)
20
    {
21
        $builder->add(
22
            'profile',
23
            new ProfileType(),
24
            array(
25
                'label' => false,
26
            )
27
        );
28
29
        $builder->add('username', 'text', array(
30
            'label' => 'Username',
31
        ));
32
        $builder->add('email', 'email');
33
34
        $builder->add('submitButton', 'submit', array(
35
            'label' => 'Save',
36
            'attr' => array(
37
                'class' => 'btn-primary btn-lg btn-block',
38
            ),
39
        ));
40
    }
41
42
    /**
43
     * @param OptionsResolverInterface $resolver
44
     */
45
    public function setDefaultOptions(OptionsResolverInterface $resolver)
46
    {
47
        $resolver->setDefaults(array(
48
            'data_class' => 'Application\Entity\UserEntity',
49
            'validation_groups' => array('settings'),
50
            'csrf_protection' => true,
51
            'csrf_field_name' => 'csrf_token',
52
            'cascade_validation' => true,
53
        ));
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function getName()
60
    {
61
        return 'user';
62
    }
63
}
64