Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
24 | 2 | public function get(string $identifier): Route |
|
25 | { |
||
26 | 2 | if (!isset($this->methods[$identifier])) { |
|
27 | 1 | throw new UnknownRouteException('The route with identifier "' . $identifier . '" is unknown', 1536351904); |
|
28 | } |
||
29 | 1 | return new Route($this->methods[$identifier][0], $this->methods[$identifier][1]); |
|
30 | } |
||
31 | } |
||
32 |