Completed
Pull Request — master (#90)
by Arnaud
02:31
created

FilterConfiguration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A configureOptions() 0 10 1
1
<?php
2
3
namespace LAG\AdminBundle\Filter\Configuration;
4
5
use JK\Configuration\Configuration;
6
use Symfony\Component\OptionsResolver\Options;
7
use Symfony\Component\OptionsResolver\OptionsResolver;
8
9
class FilterConfiguration extends Configuration
10
{
11
    /**
12
     * Define allowed parameters and values for this configuration, using optionsResolver component.
13
     *
14
     * @param OptionsResolver $resolver
15
     */
16
    public function configureOptions(OptionsResolver $resolver)
17
    {
18
        $resolver
19
            ->setDefaults([
20
                'options' => [],
21
                'type' => 'string',
22
            ])
23
            ->setAllowedTypes('type', 'string')
24
        ;
25
    }
26
}
27