-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid return type when method does not return #20639
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,7 +164,9 @@ use {{invokerPackage}}\ObjectSerializer; | |
* | ||
* @throws ApiException on non-2xx response or if the response body is not in the expected format | ||
* @throws InvalidArgumentException | ||
{{#returnType}} | ||
* @return {{{vendorExtensions.x-php-doc-return-type}}} | ||
{{/returnType}} | ||
{{#isDeprecated}} | ||
* @deprecated | ||
{{/isDeprecated}} | ||
|
@@ -185,7 +187,7 @@ use {{invokerPackage}}\ObjectSerializer; | |
{{#vendorExtensions.x-group-parameters}} | ||
array $associative_array | ||
{{/vendorExtensions.x-group-parameters}} | ||
): {{{vendorExtensions.x-php-return-type}}} | ||
){{#returnType}}: {{{vendorExtensions.x-php-return-type}}}{{/returnType}} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe we should keep it as seems like that's what the php community prefers: https://stackoverflow.com/a/33671413 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please note we get this: return type without There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah ok. looks like a different issue ... i'll take a further look |
||
{ | ||
{{#returnType}}list($response) = {{/returnType}}$this->{{operationId}}WithHttpInfo({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}, {{/allParams}}{{#servers}}{{#-first}}$hostIndex, $variables, {{/-first}}{{/servers}}$contentType{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}});{{#returnType}} | ||
return $response;{{/returnType}} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in other languages such as java, the doc is also completely omitted if it's void so make senses php follows the same.