NodeDeleteInput   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 20
c 0
b 0
f 0
ccs 0
cts 10
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 3 1
A configureOptions() 0 7 1
1
<?php
2
/*******************************************************************************
3
 *  This file is part of the GraphQL Bundle package.
4
 *
5
 *  (c) YnloUltratech <[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
namespace Ynlo\GraphQLBundle\Form\Node;
12
13
use Symfony\Component\Form\AbstractType;
14
use Symfony\Component\Form\FormBuilderInterface;
15
use Symfony\Component\OptionsResolver\OptionsResolver;
16
use Ynlo\GraphQLBundle\Model\NodeInterface;
17
18
/**
19
 * NodeDeleteInput
20
 */
21
class NodeDeleteInput extends AbstractType
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function buildForm(FormBuilderInterface $builder, array $options)
27
    {
28
        $builder->add('id', null, ['required' => true]);
29
    }
30
31
    /**
32
     * {@inheritdoc}
33
     */
34
    public function configureOptions(OptionsResolver $resolver)
35
    {
36
        parent::configureOptions($resolver);
37
38
        $resolver->setDefaults(
39
            [
40
                'data_class' => NodeInterface::class,
41
            ]
42
        );
43
    }
44
}
45