Mbe4GatewayConfigurationType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 46
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 40 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PH\Bundle\PayumBundle\Form\Type;
6
7
use Symfony\Component\Form\AbstractType;
8
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
9
use Symfony\Component\Form\Extension\Core\Type\TextType;
10
use Symfony\Component\Form\FormBuilderInterface;
11
use Symfony\Component\Validator\Constraints\NotBlank;
12
13
final class Mbe4GatewayConfigurationType extends AbstractType
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function buildForm(FormBuilderInterface $builder, array $options): void
19
    {
20
        $builder
21
            ->add('username', TextType::class, [
22
                'constraints' => [
23
                    new NotBlank([
24
                        'groups' => 'ph',
25
                    ]),
26
                ],
27
            ])
28
            ->add('password', TextType::class, [
29
                'constraints' => [
30
                    new NotBlank([
31
                        'groups' => 'ph',
32
                    ]),
33
                ],
34
            ])
35
            ->add('clientId', TextType::class, [
36
                'constraints' => [
37
                    new NotBlank([
38
                        'groups' => 'ph',
39
                    ]),
40
                ],
41
            ])
42
            ->add('serviceId', TextType::class, [
43
                'constraints' => [
44
                    new NotBlank([
45
                        'groups' => 'ph',
46
                    ]),
47
                ],
48
            ])
49
            ->add('contentclass', IntegerType::class, [
50
                'constraints' => [
51
                    new NotBlank([
52
                        'groups' => 'ph',
53
                    ]),
54
                ],
55
            ])
56
        ;
57
    }
58
}
59