Completed
Pull Request — master (#107)
by
unknown
06:49 queued 03:48
created

MultiSelectFilterConfig   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
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 44
rs 10

3 Methods

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