Test Setup Failed
Push — master ( f50e96...1d7e99 )
by Gabriel
07:34 queued 11s
created

HasCurrentRouteTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setCurrent() 0 6 1
A getCurrent() 0 4 1
1
<?php
2
3
namespace Nip\Router\Router\Traits;
4
5
use Nip\Router\Route\Route;
6
7
/**
8
 * Trait HasCurrentRouteTrait
9
 * @package Nip\Router\Router\Traits
10
 */
11
trait HasCurrentRouteTrait
12
{
13
14
    /**
15
     * @var Route
16
     */
17
    protected $route;
18
19
20
    /**
21
     * @param Route $route
22
     * @return $this
23
     */
24
    public function setCurrent($route)
25
    {
26
        $this->route = $route;
27
28
        return $this;
29
    }
30
31
    /**
32
     * @return Route
33
     */
34
    public function getCurrent()
35
    {
36
        return $this->route;
37
    }
38
}
39