VerificationType::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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