From 7c7ac2f0d3c82b80bfcf145947c8a7ad9bcfff43 Mon Sep 17 00:00:00 2001 From: Thomas Hansen Date: Sun, 24 Jul 2022 03:18:48 +0200 Subject: [PATCH] [PHP] double curly braces bugfix (#12999) * [PHP] Small bugfix: fix punctual double curly bracket usage, to make it consistent with the code around * [AUTOGENERATED] update samples --- modules/openapi-generator/src/main/resources/php/api.mustache | 2 +- .../client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php/api.mustache b/modules/openapi-generator/src/main/resources/php/api.mustache index cb143c12c07..bfab1fa8644 100644 --- a/modules/openapi-generator/src/main/resources/php/api.mustache +++ b/modules/openapi-generator/src/main/resources/php/api.mustache @@ -233,7 +233,7 @@ use {{invokerPackage}}\ObjectSerializer; $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('{{dataType}}' !== 'string') { + if ('{{{dataType}}}' !== 'string') { $content = json_decode($content); } } diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index e7ae057751d..19a0faf690f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -412,7 +412,7 @@ class StoreApi $content = $response->getBody(); //stream goes to serializer } else { $content = (string) $response->getBody(); - if ('array<string,int>' !== 'string') { + if ('array' !== 'string') { $content = json_decode($content); } }