EmailType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
B buildForm() 0 33 1
1
<?php
2
3
namespace DoS\MailerBundle\Form\Type;
4
5
use Sylius\Bundle\MailerBundle\Form\Type\EmailType as BaseEmailType;
6
use Symfony\Component\Form\FormBuilderInterface;
7
8
class EmailType extends BaseEmailType
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function buildForm(FormBuilderInterface $builder, array $options)
14
    {
15
        $builder
16
            ->add('code', 'text', array(
17
                'label' => 'sylius.form.email.code',
18
            ))
19
            ->add('enabled', 'checkbox', array(
20
                'required' => false,
21
                'label'    => 'sylius.form.email.enabled',
22
            ))
23
            ->add('senderName', 'text', array(
24
                'required' => false,
25
                'label' => 'sylius.form.email.sender_name',
26
            ))
27
            ->add('senderAddress', 'email', array(
28
                'required' => false,
29
                'label' => 'sylius.form.email.sender_address',
30
            ))
31
            ->add('subject', 'text', array(
32
                'label' => 'sylius.form.email.subject',
33
            ))
34
            ->add('content', 'textarea', array(
35
                'required' => false,
36
                'label' => 'sylius.form.email.content',
37
            ))
38
            // FIXME: for now we have bug (SF2.7) with empty choice validate!
0 ignored issues
show
Unused Code Comprehensibility introduced by
41% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
39
//            ->add('template', 'sylius_email_template_choice', array(
40
//                'label'       => 'sylius.form.email.template',
41
//                'required'    => false,
42
//                'empty_value' => 'sylius.form.email.no_template',
43
//            ))
44
        ;
45
    }
46
}
47