VerificationType   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A buildForm() 0 4 1
A getName() 0 4 1
1
<?php
2
3
namespace DoS\UserBundle\Confirmation\Form\Type;
4
5
use DoS\UserBundle\Confirmation\Email\Confirmation;
6
use DoS\UserBundle\Confirmation\Form\EventListener\SubjectAdderListener;
7
use Symfony\Component\Form\AbstractType;
8
use Symfony\Component\Form\FormBuilderInterface;
9
10
class VerificationType extends AbstractType
11
{
12
    /**
13
     * @var Confirmation
14
     */
15
    protected $confirmation;
16
17
    public function __construct(Confirmation $confirmation)
18
    {
19
        $this->confirmation = $confirmation;
20
    }
21
22
    public function buildForm(FormBuilderInterface $builder, array $options = array())
23
    {
24
        $builder->addEventSubscriber(new SubjectAdderListener($this->confirmation));
25
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function getName()
31
    {
32
        return 'dos_verification';
33
    }
34
}
35