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

RoutingError   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 24
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getStatusCode() 0 4 1
A getMessage() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace N1215\Http\Router\Result;
5
6
use N1215\Http\Router\RoutingErrorInterface;
7
8
final class RoutingError implements RoutingErrorInterface
9
{
10
    /** @var int  */
11
    private $statusCode;
12
13
    /** @var string  */
14
    private $message;
15
16 5
    public function __construct(int $statusCode, string $message)
17
    {
18 5
        $this->statusCode = $statusCode;
19 5
        $this->message = $message;
20 5
    }
21
22 3
    public function getStatusCode(): int
23
    {
24 3
        return $this->statusCode;
25
    }
26
27 3
    public function getMessage(): string
28
    {
29 3
        return $this->message;
30
    }
31
}
32