Completed
Push — master ( 72d72a...bb8091 )
by Yaro
06:09
created

Filter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 17
rs 10
c 0
b 0
f 0
ccs 6
cts 6
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A filter() 0 12 2
1
<?php
2
3
namespace Yaro\Jarboe\Table\Fields\Traits;
4
5
use Yaro\Jarboe\Table\Filters\AbstractFilter;
6
7
trait Filter
8
{
9
    protected $filter = null;
10
11 45
    public function filter(AbstractFilter $filter = null)
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
12
    {
13 45
        if (is_null($filter)) {
14 45
            return $this->filter;
15
        }
16
17 16
        $filter->field($this);
18
19 16
        $this->filter = $filter;
20
21 16
        return $this;
22
    }
23
}
24