Completed
Push — master ( a52764...802455 )
by n
59:28
created

RoutingFailure::getMatchedParams()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace N1215\Http\Router\Result;
5
6
use N1215\Http\Router\RoutingErrorInterface;
7
use N1215\Http\Router\RoutingResultInterface;
8
use Psr\Http\Server\RequestHandlerInterface;
9
10
final class RoutingFailure implements RoutingResultInterface
11
{
12
    /** @var RoutingErrorInterface|null  */
13
    private $error;
14
15 3
    public function __construct(RoutingErrorInterface $error = null)
16
    {
17 3
        $this->error = $error;
18 3
    }
19
20 3
    public function isSuccess(): bool
21
    {
22 3
        return false;
23
    }
24
25 2
    public function getMatchedHandler(): ?RequestHandlerInterface
26
    {
27 2
        return null;
28
    }
29
30 2
    public function getMatchedParams(): array
31
    {
32 2
        return [];
33
    }
34
35 3
    public function getError(): ?RoutingErrorInterface
36
    {
37 3
        return $this->error;
38
    }
39
}
40