RouteMatch::getAttributes()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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