SpecificationType   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A buildForm() 0 16 1
1
<?php
2
3
/**
4
 * @author Rafał Muszyński <[email protected]>
5
 * @copyright 2013 Sourcefabric o.p.s.
6
 * @license http://www.gnu.org/licenses/gpl-3.0.txt
7
 */
8
9
namespace Newscoop\PaywallBundle\Form\Type;
10
11
use Symfony\Component\Form\AbstractType;
12
use Symfony\Component\Form\FormBuilderInterface;
13
14
class SpecificationType extends AbstractType
15
{
16
    public function buildForm(FormBuilderInterface $builder, array $options)
17
    {
18
        $builder
19
        ->add('publication', 'integer', array(
20
            'required' => true,
21
        ))
22
        ->add('issue', 'integer', array(
23
            'required' => false,
24
        ))
25
        ->add('section', 'integer', array(
26
            'required' => false,
27
        ))
28
        ->add('article', 'integer', array(
29
            'required' => false,
30
        ));
31
    }
32
33
    public function getName()
34
    {
35
        return 'specificationForm';
36
    }
37
}
38