diff --git a/.gitignore b/.gitignore index 9f8932913749..67e64d8cf692 100644 --- a/.gitignore +++ b/.gitignore @@ -193,6 +193,7 @@ samples/server/petstore/php-slim4/composer.lock samples/server/petstore/php-symfony/SymfonyBundle-php/composer.lock samples/server/petstore/php-mezzio-ph/composer.lock samples/server/petstore/php-mezzio-ph-modern/composer.lock +samples/client/petstore/php-nextgen/OpenAPIClient-php/.phplint.cache/ # ts samples/client/petstore/typescript-angular2/npm/npm-debug.log diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpNextgenClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpNextgenClientCodegen.java index ebea0814795e..db4c29e32bcf 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpNextgenClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpNextgenClientCodegen.java @@ -170,7 +170,11 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List{{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/phplint.dist.yml b/samples/client/petstore/php-nextgen/OpenAPIClient-php/phplint.dist.yml new file mode 100644 index 000000000000..3a1d5b715e9f --- /dev/null +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/phplint.dist.yml @@ -0,0 +1,13 @@ +path: + - src/ + - tests/ +jobs: 10 +extensions: + - php +exclude: + - vendor +warning: true +memory-limit: -1 +no-cache: false +log-json: false +log-junit: false 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 d7bc09704eb3..e90831e0c556 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 @@ -827,7 +827,7 @@ public function deletePetRequest( public function findPetsByStatus( array $status, string $contentType = self::contentTypes['findPetsByStatus'][0] - ): \OpenAPI\Client\Model\Pet[] + ): array { list($response) = $this->findPetsByStatusWithHttpInfo($status, $contentType); return $response; @@ -1131,7 +1131,7 @@ public function findPetsByStatusRequest( public function findPetsByTags( array $tags, string $contentType = self::contentTypes['findPetsByTags'][0] - ): \OpenAPI\Client\Model\Pet[] + ): array { list($response) = $this->findPetsByTagsWithHttpInfo($tags, $contentType); return $response; 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 22a8d864b151..7af35028e6db 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 @@ -390,7 +390,7 @@ public function deleteOrderRequest( */ public function getInventory( string $contentType = self::contentTypes['getInventory'][0] - ): array<string,int> + ): array { list($response) = $this->getInventoryWithHttpInfo($contentType); return $response;