Completed
Pull Request — 5.0 (#2162)
by Kevin
14:33
created

NodeSearchBundle/Form/NodeSearchAdminType.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Kunstmaan\NodeSearchBundle\Form;
4
5
use Symfony\Component\Form\AbstractType;
6
use Symfony\Component\Form\Extension\Core\Type\TextType;
7
use Symfony\Component\Form\FormBuilderInterface;
8
use Symfony\Component\OptionsResolver\OptionsResolver;
9
10 View Code Duplication
class NodeSearchAdminType extends AbstractType
0 ignored issues
show
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
11
{
12
    /**
13
     * @param FormBuilderInterface $builder
14
     * @param array                $options
15
     */
16
    public function buildForm(FormBuilderInterface $builder, array $options)
17
    {
18
        $builder->add('boost', TextType::class, array(
19
            'label' => 'node_search.form.search.boost.label',
20
        ));
21
    }
22
23
    /**
24
     * @return string
25
     */
26
    public function getBlockPrefix()
27
    {
28
        return 'node_search';
29
    }
30
31
    /**
32
     * @param OptionsResolver $resolver
33
     */
34
    public function configureOptions(OptionsResolver $resolver)
35
    {
36
        $resolver->setDefaults(
37
            array(
38
                'data_class' => 'Kunstmaan\NodeSearchBundle\Entity\NodeSearch',
39
            )
40
        );
41
    }
42
}
43