Skip to content

Commit 95be341

Browse files
authored
Merge pull request #7575 from kenjis/refactor-AutoRouterImproved-getRoute
refactor: [Auto Routing Improved] ensure $httpVerb is lower case
2 parents 712ddbf + 9527ee9 commit 95be341

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)