Completed
Pull Request — master (#107)
by
unknown
04:43 queued 02:07
created

MultiSelectFilterConfig   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 41
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setSize() 0 5 1
A getSize() 0 4 1
A setOperator() 0 4 1
1
<?php
2
namespace Nayjest\Grids;
3
4
class MultiSelectFilterConfig extends SelectFilterConfig
5
{
6
    protected $template = '*.multiselect';
7
    protected $size = 4;
8
9
    protected $operator = FilterConfig::OPERATOR_IN;
10
11
    /**
12
     * Sets the size of the select element
13
     *
14
     * @param int $size
15
     * @return $this
16
     */
17
    public function setSize($size)
18
    {
19
        $this->size = $size;
20
        return $this;
21
    }
22
23
    /**
24
     * Returns the size of the select element
25
     *
26
     * @return int
27
     */
28
    public function getSize()
29
    {
30
        return $this->size;
31
    }
32
33
    /**
34
     * This has no effect and should not be used for MultiSelectFilters
35
     * (we need to use OPERATOR_IN)
36
     *
37
     * @param $operator
38
     * @return $this
39
     */
40
    public function setOperator($operator)
41
    {
42
        return $this;
43
    }
44
}
45
46