Activate   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setActive() 0 6 1
A isActive() 0 4 1
1
<?php namespace NukaCode\Menu\Traits;
2
3
4
/**
5
 * Class Activate
6
 *
7
 * @package NukaCode\Menu\Traits
8
 */
9
trait Activate {
10
11
    /**
12
     * Is the link active.
13
     *
14
     * @var bool
15
     */
16
    public $active;
17
18
    /**
19
     * Set this link as active.
20
     *
21
     * @param bool $bool
22
     *
23
     * @return $this
24
     */
25 4
    public function setActive($bool = true)
26
    {
27 4
        $this->active = $bool;
28
29 4
        return $this;
30
    }
31
32
    /**
33
     * Check if the link is active or not.
34
     *
35
     * @return bool
36
     */
37 2
    public function isActive()
38
    {
39 2
        return $this->active;
40
    }
41
}