Result   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 46
ccs 10
cts 10
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getHandler() 0 4 1
A getParams() 0 4 1
A getRoute() 0 4 1
1
<?php
2
3
namespace SimpleRoute;
4
5
final class Result implements ResultInterface
6
{
7
    /**
8
     * @var RouteInterface
9
     */
10
    private $route;
11
12
    /**
13
     * @var array
14
     */
15
    private $params;
16
17
    /**
18
     * @param RouteInterface $route
19
     * @param array $params
20
     */
21 9
    public function __construct(RouteInterface $route, array $params)
22
    {
23 9
        $this->route = $route;
24 9
        $this->params = $params;
25 9
    }
26
27
    /**
28
     * {@inheritdoc}
29
     */
30 3
    public function getHandler()
31
    {
32 3
        return $this->route->getHandler();
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     */
38 6
    public function getParams()
39
    {
40 6
        return $this->params;
41
    }
42
43
    /**
44
     * {@inheritdoc}
45
     */
46 6
    public function getRoute()
47
    {
48 6
        return $this->route;
49
    }
50
}
51