Skip to content

Commit de9d102

Browse files
committed
Correct routing method name calling
1 parent 486e620 commit de9d102

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Generator/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ private static function callOperation(Routers $routers, string $namespace, Repre
11571157
),
11581158
),
11591159
new Node\Name(
1160-
$router->method,
1160+
Utils::fixKeyword($router->method),
11611161
),
11621162
[
11631163
new Arg(
@@ -1240,7 +1240,7 @@ private static function makeCall(string $namespace, Representation\Operation $op
12401240
*/
12411241
private static function createRouter(string $pathPrefix, string $namespace, RouterClass $router, Routers $routers, Method $constructor, array $properties): iterable
12421242
{
1243-
$className = $routers->createClassName($router->method, $router->group, '')->class;
1243+
$className = $routers->createClassName(Utils::fixKeyword($router->method), $router->group, '')->class;
12441244
$factory = new BuilderFactory();
12451245
$stmt = $factory->namespace(trim(Utils::dirname($namespace . $className), '\\'));
12461246
$class = $factory->class(trim(Utils::basename($className), '\\'))->makeFinal()->addStmt(

0 commit comments

Comments
 (0)