RouteMatch::isMatch()   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 15
    public function __construct(
10
        private readonly ControllerInterface $controller,
11
        private readonly array $attributes = []
12 15
    ) {}
13
14 15
    public function isMatch(): bool
15
    {
16 15
        return true;
17
    }
18
19 15
    public function getController(): ControllerInterface
20
    {
21 15
        return $this->controller;
22
    }
23
24 8
    public function getAttributes(): array
25
    {
26 8
        return $this->attributes;
27
    }
28
}
29