Completed
Push — master ( e23ec4...bcf727 )
by Terzi
04:42
created

HandlesVisibility   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 11
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A visibleWhen() 0 3 2
1
<?php
2
3
namespace Terranet\Administrator\Field\Traits;
4
5
trait HandlesVisibility
6
{
7
    /** @var null|\Closure */
8
    protected $when;
9
10
    /**
11
     * @return bool
12
     */
13
    public function visibleWhen(): bool
14
    {
15
        return $this->when ? $this->when->call($this, request()) : true;
16
    }
17
}
18