Passed
Push — develop ( 17af2a...002f70 )
by Ludwig
03:25 queued 10s
created

CheckboxType::configureOptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 9

Duplication

Lines 14
Ratio 100 %

Importance

Changes 0
Metric Value
dl 14
loc 14
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 9
nc 1
nop 1
1
<?php
2
/*
3
 * This file is part of cwdFancyGridBundle
4
 *
5
 * (c)2017 cwd.at GmbH <[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
declare(strict_types=1);
11
namespace Cwd\FancyGridBundle\Column;
12
13
use Symfony\Component\OptionsResolver\OptionsResolver;
14
15
/**
16
 * Class CheckboxType
17
 * @package Cwd\FancyGridBundle\Column
18
 * @author Ludwig Ruderstaler <[email protected]>
19
 */
20 View Code Duplication
class CheckboxType extends AbstractColumn
0 ignored issues
show
Duplication introduced by
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...
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function configureOptions(OptionsResolver $resolver)
26
    {
27
        parent::configureOptions($resolver);
28
29
        $resolver->setDefaults(array(
30
            'align' => 'center',
31
            'cellAlign' => 'center',
32
            'type' => 'checkbox',
33
            'summary' => null,
34
            'step' => null,
35
        ));
36
37
        $resolver->setAllowedTypes('attr', 'array');
38
    }
39
}
40