BatchContentType   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 26
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 6 1
A configureOptions() 0 10 1
1
<?php
2
3
/*
4
 * This file is part of the Ivoaz ContentEditable bundle.
5
 *
6
 * (c) Ivo Azirjans <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Ivoaz\Bundle\ContentEditableBundle\Form\Type;
13
14
use Ivoaz\Bundle\ContentEditableBundle\Form\Model\BatchContent;
15
use Symfony\Component\Form\FormBuilderInterface;
16
use Symfony\Component\OptionsResolver\OptionsResolver;
17
18
/**
19
 * @author Ivo Azirjans <[email protected]>
20
 */
21
class BatchContentType extends ContentType
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26 1
    public function buildForm(FormBuilderInterface $builder, array $options)
27
    {
28 1
        parent::buildForm($builder, $options);
29
30 1
        $builder->add('id');
31 1
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36 1
    public function configureOptions(OptionsResolver $resolver)
37
    {
38 1
        parent::configureOptions($resolver);
39
40 1
        $resolver->setDefaults(
41
            [
42 1
                'data_class' => BatchContent::class,
43
            ]
44 1
        );
45 1
    }
46
}
47