Skip to content

Commit 5e716e9

Browse files
authored
Merge pull request #55 from php-api-clients/trim-ending-_-from-path
Trim ending ? from path
2 parents c4f4bf8 + aa0a0ce commit 5e716e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Generator/Operation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public static function generate(string $path, string $method, string $namespace,
123123
[
124124
new Node\Expr\Array_(array_map(static fn (string $key): Node\Expr\ArrayItem => new Node\Expr\ArrayItem(new Node\Scalar\String_($key)), array_keys($requestReplaces))),
125125
new Node\Expr\Array_(array_values($requestReplaces)),
126-
new Node\Scalar\String_($path . '?' . implode('&', $query)),
126+
new Node\Scalar\String_(rtrim($path . '?' . implode('&', $query), '?')),
127127
]
128128
)),
129129
]

0 commit comments

Comments
 (0)