UserActionsType   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 0
cbo 3
dl 0
loc 36
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 8 1
A setDefaultOptions() 0 8 1
A getName() 0 4 1
1
<?php
2
3
4
namespace Tahoe\Bundle\MultiTenancyBundle\Form\Type;
5
6
7
use Symfony\Component\Form\AbstractType;
8
use Symfony\Component\Form\FormBuilderInterface;
9
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
10
11
class UserActionsType extends AbstractType {
12
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function buildForm(FormBuilderInterface $builder, array $options)
17
    {
18
        $builder
19
            ->add('promote', 'submit')
20
            ->add('demote', 'submit')
21
            ->add('remove', 'submit');
22
23
    }
24
25
    /**
26
     * @param OptionsResolverInterface $resolver
27
     */
28
    public function setDefaultOptions(OptionsResolverInterface $resolver)
29
    {
30
        $resolver->setDefaults(
31
            array(
32
33
            )
34
        );
35
    }
36
37
    /**
38
     * Returns the name of this type.
39
     *
40
     * @return string The name of this type
41
     */
42
    public function getName()
43
    {
44
        return 'user_actions_form';
45
    }
46
}