Skip to content

Commit 9527ee9

Browse files
committed
refactor: ensure $httpVerb is lower case
1 parent c87169d commit 9527ee9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

system/Router/AutoRouterImproved.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ public function __construct(// @phpstan-ignore-line
104104
*/
105105
public function getRoute(string $uri, string $httpVerb): array
106106
{
107-
$defaultMethod = strtolower($httpVerb) . ucfirst($this->defaultMethod);
107+
$httpVerb = strtolower($httpVerb);
108+
109+
$defaultMethod = $httpVerb . ucfirst($this->defaultMethod);
108110
$this->method = $defaultMethod;
109111

110112
$segments = explode('/', $uri);

0 commit comments

Comments
 (0)