diff --git a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache index 7d679de68df8..866871194273 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache @@ -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}} { {{#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}} diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php index a19ddcfdb56e..cf0b30d42480 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php @@ -1165,14 +1165,13 @@ public function fakeHealthGetRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function fakeHttpSignatureTest( \OpenAPI\Client\Model\Pet $pet, ?string $query_1 = null, ?string $header_1 = null, string $contentType = self::contentTypes['fakeHttpSignatureTest'][0] - ): void + ) { $this->fakeHttpSignatureTestWithHttpInfo($pet, $query_1, $header_1, $contentType); } @@ -2975,12 +2974,11 @@ public function fakePropertyEnumIntegerSerializeRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function testAdditionalPropertiesReference( array $request_body, string $contentType = self::contentTypes['testAdditionalPropertiesReference'][0] - ): void + ) { $this->testAdditionalPropertiesReferenceWithHttpInfo($request_body, $contentType); } @@ -3204,12 +3202,11 @@ public function testAdditionalPropertiesReferenceRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function testBodyWithBinary( ?\SplFileObject $body, string $contentType = self::contentTypes['testBodyWithBinary'][0] - ): void + ) { $this->testBodyWithBinaryWithHttpInfo($body, $contentType); } @@ -3427,12 +3424,11 @@ public function testBodyWithBinaryRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function testBodyWithFileSchema( \OpenAPI\Client\Model\FileSchemaTestClass $file_schema_test_class, string $contentType = self::contentTypes['testBodyWithFileSchema'][0] - ): void + ) { $this->testBodyWithFileSchemaWithHttpInfo($file_schema_test_class, $contentType); } @@ -3651,13 +3647,12 @@ public function testBodyWithFileSchemaRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function testBodyWithQueryParams( string $query, \OpenAPI\Client\Model\User $user, string $contentType = self::contentTypes['testBodyWithQueryParams'][0] - ): void + ) { $this->testBodyWithQueryParamsWithHttpInfo($query, $user, $contentType); } @@ -4236,7 +4231,6 @@ public function testClientModelRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function testEndpointParameters( float $number, @@ -4254,7 +4248,7 @@ public function testEndpointParameters( ?string $password = null, ?string $callback = null, string $contentType = self::contentTypes['testEndpointParameters'][0] - ): void + ) { $this->testEndpointParametersWithHttpInfo($number, $double, $pattern_without_delimiter, $byte, $integer, $int32, $int64, $float, $string, $binary, $date, $date_time, $password, $callback, $contentType); } @@ -4725,7 +4719,6 @@ public function testEndpointParametersRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function testEnumParameters( ?array $enum_header_string_array = ['$'], @@ -4738,7 +4731,7 @@ public function testEnumParameters( ?array $enum_form_string_array = ['$'], ?string $enum_form_string = '-efg', string $contentType = self::contentTypes['testEnumParameters'][0] - ): void + ) { $this->testEnumParametersWithHttpInfo($enum_header_string_array, $enum_header_string, $enum_query_string_array, $enum_query_string, $enum_query_integer, $enum_query_double, $enum_query_model_array, $enum_form_string_array, $enum_form_string, $contentType); } @@ -5094,11 +5087,10 @@ public function testEnumParametersRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function testGroupParameters( array $associative_array - ): void + ) { $this->testGroupParametersWithHttpInfo($associative_array); } @@ -5414,12 +5406,11 @@ public function testGroupParametersRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function testInlineAdditionalProperties( array $request_body, string $contentType = self::contentTypes['testInlineAdditionalProperties'][0] - ): void + ) { $this->testInlineAdditionalPropertiesWithHttpInfo($request_body, $contentType); } @@ -5645,12 +5636,11 @@ public function testInlineAdditionalPropertiesRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function testInlineFreeformAdditionalProperties( \OpenAPI\Client\Model\TestInlineFreeformAdditionalPropertiesRequest $test_inline_freeform_additional_properties_request, string $contentType = self::contentTypes['testInlineFreeformAdditionalProperties'][0] - ): void + ) { $this->testInlineFreeformAdditionalPropertiesWithHttpInfo($test_inline_freeform_additional_properties_request, $contentType); } @@ -5877,13 +5867,12 @@ public function testInlineFreeformAdditionalPropertiesRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function testJsonFormData( string $param, string $param2, string $contentType = self::contentTypes['testJsonFormData'][0] - ): void + ) { $this->testJsonFormDataWithHttpInfo($param, $param2, $contentType); } @@ -6125,12 +6114,11 @@ public function testJsonFormDataRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function testNullable( \OpenAPI\Client\Model\ChildWithNullable $child_with_nullable, string $contentType = self::contentTypes['testNullable'][0] - ): void + ) { $this->testNullableWithHttpInfo($child_with_nullable, $contentType); } @@ -6360,7 +6348,6 @@ public function testNullableRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function testQueryParameterCollectionFormat( array $pipe, @@ -6371,7 +6358,7 @@ public function testQueryParameterCollectionFormat( string $allow_empty, ?array $language = null, string $contentType = self::contentTypes['testQueryParameterCollectionFormat'][0] - ): void + ) { $this->testQueryParameterCollectionFormatWithHttpInfo($pipe, $ioutil, $http, $url, $context, $allow_empty, $language, $contentType); } @@ -6731,12 +6718,11 @@ public function testQueryParameterCollectionFormatRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function testStringMapReference( array $request_body, string $contentType = self::contentTypes['testStringMapReference'][0] - ): void + ) { $this->testStringMapReferenceWithHttpInfo($request_body, $contentType); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php index ee8285375e50..ed6f5f90efb4 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php @@ -176,14 +176,13 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function addPet( \OpenAPI\Client\Model\Pet $pet, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['addPet'][0] - ): void + ) { $this->addPetWithHttpInfo($pet, $hostIndex, $variables, $contentType); } @@ -546,13 +545,12 @@ protected function getHostSettingsForaddPet(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function deletePet( int $pet_id, ?string $api_key = null, string $contentType = self::contentTypes['deletePet'][0] - ): void + ) { $this->deletePetWithHttpInfo($pet_id, $api_key, $contentType); } @@ -1803,14 +1801,13 @@ public function getPetByIdRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function updatePet( \OpenAPI\Client\Model\Pet $pet, ?int $hostIndex = null, array $variables = [], string $contentType = self::contentTypes['updatePet'][0] - ): void + ) { $this->updatePetWithHttpInfo($pet, $hostIndex, $variables, $contentType); } @@ -2174,14 +2171,13 @@ protected function getHostSettingsForupdatePet(): array * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function updatePetWithForm( int $pet_id, ?string $name = null, ?string $status = null, string $contentType = self::contentTypes['updatePetWithForm'][0] - ): void + ) { $this->updatePetWithFormWithHttpInfo($pet_id, $name, $status, $contentType); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php index 61009b0cd621..0884ab22b11f 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php @@ -141,12 +141,11 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function deleteOrder( string $order_id, string $contentType = self::contentTypes['deleteOrder'][0] - ): void + ) { $this->deleteOrderWithHttpInfo($order_id, $contentType); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php index 9a899b720a8b..b07731133e46 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php @@ -153,12 +153,11 @@ public function getConfig(): Configuration * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function createUser( \OpenAPI\Client\Model\User $user, string $contentType = self::contentTypes['createUser'][0] - ): void + ) { $this->createUserWithHttpInfo($user, $contentType); } @@ -384,12 +383,11 @@ public function createUserRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function createUsersWithArrayInput( array $user, string $contentType = self::contentTypes['createUsersWithArrayInput'][0] - ): void + ) { $this->createUsersWithArrayInputWithHttpInfo($user, $contentType); } @@ -615,12 +613,11 @@ public function createUsersWithArrayInputRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function createUsersWithListInput( array $user, string $contentType = self::contentTypes['createUsersWithListInput'][0] - ): void + ) { $this->createUsersWithListInputWithHttpInfo($user, $contentType); } @@ -846,12 +843,11 @@ public function createUsersWithListInputRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function deleteUser( string $username, string $contentType = self::contentTypes['deleteUser'][0] - ): void + ) { $this->deleteUserWithHttpInfo($username, $contentType); } @@ -1750,11 +1746,10 @@ public function loginUserRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function logoutUser( string $contentType = self::contentTypes['logoutUser'][0] - ): void + ) { $this->logoutUserWithHttpInfo($contentType); } @@ -1959,13 +1954,12 @@ public function logoutUserRequest( * * @throws ApiException on non-2xx response or if the response body is not in the expected format * @throws InvalidArgumentException - * @return void */ public function updateUser( string $username, \OpenAPI\Client\Model\User $user, string $contentType = self::contentTypes['updateUser'][0] - ): void + ) { $this->updateUserWithHttpInfo($username, $user, $contentType); }