BooleanType::getParent()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/*
3
 * This file is part of the FreshCommonApiBundle
4
 *
5
 * (c) Artem Henvald <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
declare(strict_types=1);
12
13
namespace Fresh\CommonApiBundle\Form\Type;
14
15
use Fresh\CommonApiBundle\Form\DataTransformer\BooleanDataTransformer;
16
use Symfony\Component\Form\AbstractType;
17
use Symfony\Component\Form\Extension\Core\Type\TextType;
18
use Symfony\Component\Form\FormBuilderInterface;
19
20
/**
21
 * BooleanType.
22
 *
23
 * @author Artem Henvald <[email protected]>
24
 */
25
class BooleanType extends AbstractType
26
{
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function buildForm(FormBuilderInterface $builder, array $options): void
31
    {
32
        $builder->addViewTransformer(new BooleanDataTransformer());
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38
    public function getParent(): string
39
    {
40
        return TextType::class;
41
    }
42
}
43