AddToCartType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 10 1
1
<?php
2
3
namespace GGGGino\SkuskuCartBundle\Form\Type;
4
5
use Symfony\Component\Form\AbstractType;
6
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
7
use Symfony\Component\Form\FormBuilderInterface;
8
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
9
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
10
11
class AddToCartType extends AbstractType
12
{
13
    public function buildForm(FormBuilderInterface $builder, array $options)
14
    {
15
        $builder
16
            ->add('idProduct', HiddenType::class)
17
            ->add('quantity', IntegerType::class,
18
                array(
19
                    'label' => 'quantity'
20
                ))
21
            ->add('add', SubmitType::class, array(
22
                'label' => 'add_to_cart'
23
            ));
24
    }
25
}