Total Complexity | 4 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
8 | class Route |
||
9 | { |
||
10 | /** @var string */ |
||
11 | private $method; |
||
12 | |||
13 | /** @var string */ |
||
14 | private $pattern; |
||
15 | |||
16 | /** @var RequestHandlerInterface */ |
||
17 | private $handler; |
||
18 | |||
19 | 15 | public function __construct(string $method, string $pattern, RequestHandlerInterface $handler) |
|
24 | 15 | } |
|
25 | |||
26 | /** |
||
27 | * Get the allowed HTTP method. |
||
28 | */ |
||
29 | 9 | public function method(): string |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * Get the route pattern. |
||
36 | */ |
||
37 | 12 | public function pattern(): string |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * Get the route handler. |
||
44 | */ |
||
45 | 8 | public function handler(): RequestHandlerInterface |
|
50 |