CompanyDataType   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
B buildForm() 0 26 1
A getBlockPrefix() 0 4 1
1
<?php
2
3
/*
4
 * This file has been created by developers from BitBag.
5
 * Feel free to contact us once you face any issues or want to start
6
 * another great project.
7
 * You can find more information about us on https://bitbag.shop and write us
8
 * an email on [email protected].
9
 */
10
11
declare(strict_types=1);
12
13
namespace BitBag\SyliusInvoicingPlugin\Form\Type;
14
15
use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType;
16
use Symfony\Component\Form\Extension\Core\Type\CountryType;
17
use Symfony\Component\Form\Extension\Core\Type\TextType;
18
use Symfony\Component\Form\FormBuilderInterface;
19
20
final class CompanyDataType extends AbstractResourceType
21
{
22
    public function buildForm(FormBuilderInterface $builder, array $options): void
23
    {
24
        $builder
25
            ->add('name', TextType::class, [
26
                'label' => 'bitbag_sylius_invoicing_plugin.ui.company_name',
27
            ])
28
            ->add('street', TextType::class, [
29
                'label' => 'bitbag_sylius_invoicing_plugin.ui.street',
30
            ])
31
            ->add('city', TextType::class, [
32
                'label' => 'bitbag_sylius_invoicing_plugin.ui.city',
33
            ])
34
            ->add('postcode', TextType::class, [
35
                'label' => 'bitbag_sylius_invoicing_plugin.ui.postcode',
36
            ])
37
            ->add('countryCode', CountryType::class, [
38
                'label' => 'bitbag_sylius_invoicing_plugin.ui.country',
39
            ])
40
            ->add('vatNumber', TextType::class, [
41
                'label' => 'bitbag_sylius_invoicing_plugin.ui.vat_number',
42
            ])
43
            ->add('seller', TextType::class, [
44
                'label' => 'bitbag_sylius_invoicing_plugin.ui.seller',
45
            ])
46
        ;
47
    }
48
49
    public function getBlockPrefix(): string
50
    {
51
        return 'bitbag_sylius_invoicing_plugin_company_data';
52
    }
53
}
54