RouteMatch   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 22
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getAttributes() 0 3 1
A __construct() 0 5 1
A isMatch() 0 3 1
A getController() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace jschreuder\Middle\Router;
4
5
use jschreuder\Middle\Controller\ControllerInterface;
6
7
final class RouteMatch implements RouteMatchInterface
8
{
9 9
    public function __construct(
10
        private ControllerInterface $controller,
11
        private array $attributes = []
12
    )
13
    {
14 9
    }
15
16 9
    public function isMatch(): bool
17
    {
18 9
        return true;
19
    }
20
21 9
    public function getController(): ControllerInterface
22
    {
23 9
        return $this->controller;
24
    }
25
26 2
    public function getAttributes(): array
27
    {
28 2
        return $this->attributes;
29
    }
30
}
31