RouteCollection   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getRoutes() 0 3 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace inroutephp\inroute\Compiler;
6
7
use inroutephp\inroute\Runtime\RouteInterface;
8
9
final class RouteCollection implements RouteCollectionInterface
10
{
11
    /**
12
     * @var RouteInterface[]
13
     */
14
    private $routes;
15
16
    /**
17
     * @param RouteInterface[] $routes
18
     */
19
    public function __construct(array $routes)
20
    {
21
        $this->routes = $routes;
22
    }
23
24
    public function getRoutes(): array
25
    {
26
        return $this->routes;
27
    }
28
}
29