Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 4 | ||
Bugs | 3 | Features | 0 |
1 | <?php |
||
7 | trait RouterHelpers |
||
8 | { |
||
9 | protected abstract function getHttpCode(String $slug); |
||
10 | protected abstract function instanceof($object, $class); |
||
11 | |||
12 | /** |
||
13 | * Method responsible for removing the bars |
||
14 | * at the beginning and end of the route. |
||
15 | * |
||
16 | * @param string $uri |
||
17 | * |
||
18 | * @return string |
||
19 | */ |
||
20 | protected function fixRouterUri(String $uri): String |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * Method responsible for throwing a new exception. |
||
35 | * |
||
36 | * @param string $httpCode |
||
37 | * @param string $exception |
||
38 | * @param string $message = "" |
||
39 | * @param string|array|null ...$sprints |
||
40 | */ |
||
41 | private function throwException(String $httpCode, String $exception, String $message = "", ...$sprints): \Exception |
||
49 |