RouteInfo::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 6
ccs 5
cts 5
cp 1
crap 1
rs 9.4285
1
<?php
2
namespace Penny\Route;
3
4
class RouteInfo implements RouteInfoInterface
5
{
6
    private $name;
7
    private $callable;
8
    private $params;
9
10 13
    public function __construct($name, callable $callable, $params = [])
11
    {
12 13
        $this->name = $name;
13 13
        $this->callable = $callable;
14 13
        $this->params = $params;
15 13
    }
16
17 12
    public function getName()
18
    {
19 12
        return $this->name;
20
    }
21
22 10
    public function getCallable()
23
    {
24 10
        return $this->callable;
25
    }
26
27 10
    public function getParams()
28
    {
29 10
        return $this->params;
30
    }
31
}
32