InvitationType   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
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 33
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 6 1
A setDefaultOptions() 0 8 1
A getName() 0 4 1
1
<?php
2
3
namespace Tahoe\Bundle\MultiTenancyBundle\Form;
4
5
use Symfony\Component\Form\AbstractType;
6
use Symfony\Component\Form\FormBuilderInterface;
7
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
8
9
class InvitationType extends AbstractType
10
{
11
    /**
12
     * @param FormBuilderInterface $builder
13
     * @param array                $options
14
     */
15
    public function buildForm(FormBuilderInterface $builder, array $options)
16
    {
17
        $builder
18
            ->add('email')
19
        ;
20
    }
21
22
    /**
23
     * @param OptionsResolverInterface $resolver
24
     */
25
    public function setDefaultOptions(OptionsResolverInterface $resolver)
26
    {
27
        $resolver->setDefaults(
28
            array(
29
                'data_class' => 'Tahoe\Bundle\MultiTenancyBundle\Entity\Invitation'
30
            )
31
        );
32
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function getName()
38
    {
39
        return 'invitation_form';
40
    }
41
}
42