Completed
Push — master ( a682ba...4851b3 )
by Paweł
40:50
created

RouteAwareTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 40%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getRoute() 0 4 1
A setRoute() 0 4 1
1
<?php
2
3
namespace SWP\Bundle\ContentBundle\Model;
4
5
trait RouteAwareTrait
6
{
7
    /**
8
     * @var RouteInterface|null
9
     */
10
    protected $route;
11
12
    /**
13
     * @return RouteInterface|null
14
     */
15 5
    public function getRoute()
16
    {
17 5
        return $this->route;
18
    }
19
20
    /**
21
     * @param RouteInterface $route
22
     */
23
    public function setRoute(RouteInterface $route = null)
24
    {
25
        $this->route = $route;
26
    }
27
}
28