Passed
Push — develop ( a93deb...c2cf51 )
by Ludwig
04:39
created

ChoiceType   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 20
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A configureOptions() 0 14 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 ChoiceType
17
 * @package Cwd\FancyGridBundle\Column
18
 * @author Ludwig Ruderstaler <[email protected]>
19
 */
20
class ChoiceType extends AbstractColumn
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function configureOptions(OptionsResolver $resolver)
26
    {
27
        parent::configureOptions($resolver);
28
29
        $resolver->setDefaults(array(
30
            'align' => 'left',
31
            'cellAlign' => 'left',
32
            'type' => 'combo',
33
            'data' => [],
34
        ));
35
36
        $resolver->setAllowedTypes('attr', 'array');
37
        $resolver->setAllowedTypes('data', 'array');
38
    }
39
}
40