@@ -17,7 +17,7 @@ |
||
| 17 | 17 | $controller = $route->controller(); |
| 18 | 18 | $rawParams = $route->params(); |
| 19 | 19 | foreach ($rawParams as $param => $value) { |
| 20 | - if (str_contains($controller, "{" . $param . "}")) { |
|
| 20 | + if (str_contains($controller, "{".$param."}")) { |
|
| 21 | 21 | $controller = str_replace("{".$param."}", ucfirst($value), $controller); |
| 22 | 22 | unset($rawParams[$param]); |
| 23 | 23 | } |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | * @param string $name |
| 64 | 64 | * (Optional) An unique name for this route. |
| 65 | 65 | */ |
| 66 | - public function addRoute(array|string $methods, string $uri, string $handler, string $name = ""): void |
|
| 66 | + public function addRoute(array | string $methods, string $uri, string $handler, string $name = ""): void |
|
| 67 | 67 | { |
| 68 | 68 | if (is_string($name) && trim($name) !== "") { |
| 69 | 69 | $this->route_names[$name] = $uri; |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | * @param string $name |
| 22 | 22 | * (Optional) An unique name for this route. |
| 23 | 23 | */ |
| 24 | - public function __construct(array|string $methods, string $uri, string $handler, string $name = "") |
|
| 24 | + public function __construct(array | string $methods, string $uri, string $handler, string $name = "") |
|
| 25 | 25 | { |
| 26 | 26 | $this->methods = (array)$methods; |
| 27 | 27 | $this->uri = $uri; |