Completed
Push — master ( 0073f8...fe0acb )
by wen
12:16
created

Filter::getValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Sco\Admin\View\Filters;
4
5
use Illuminate\Database\Eloquent\Builder;
6
use Sco\Admin\Contracts\View\Filters\FilterInterface;
7
8
abstract class Filter implements FilterInterface
9
{
10
    protected $value;
11
12
    /**
13
     * @return mixed
14
     */
15
    public function getValue()
16
    {
17
        return $this->value;
18
    }
19
20
    /**
21
     * @param mixed $value
22
     *
23
     * @return $this
24
     */
25
    public function setValue($value)
26
    {
27
        $this->value = $value;
28
29
        return $this;
30
    }
31
32
33
34
    public function isActive()
35
    {
36
        return !is_null($this->value);
37
    }
38
39
    /**
40
     * Apply filter to the query.
41
     *
42
     * @param Builder $query
43
     */
44
    public function apply(Builder $query)
45
    {
46
47
    }
48
}
49