From 774f9a11ea84bcf3048cc349aeb565381adc3a63 Mon Sep 17 00:00:00 2001 From: Simon Podlipsky Date: Fri, 9 Feb 2024 14:49:34 +0100 Subject: [PATCH] fix(php): do not cast to string something that's already string --- .../src/main/resources/php/ObjectSerializer.mustache | 2 +- .../petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php | 2 +- samples/client/petstore/php/psr-18/lib/ObjectSerializer.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache index 6639723ec508..938e213aabb0 100644 --- a/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache @@ -329,7 +329,7 @@ class ObjectSerializer * If it's a datetime object, format it in ISO8601 * If it's a boolean, convert it to "true" or "false". * - * @param string|bool|\DateTime $value the value of the parameter + * @param float|int|bool|\DateTime $value the value of the parameter * * @return string the header string */ diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php index 611a2b9144c1..a8067ed5b402 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php @@ -338,7 +338,7 @@ public static function toFormValue($value) * If it's a datetime object, format it in ISO8601 * If it's a boolean, convert it to "true" or "false". * - * @param string|bool|\DateTime $value the value of the parameter + * @param float|int|bool|\DateTime $value the value of the parameter * * @return string the header string */ diff --git a/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php b/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php index 611a2b9144c1..a8067ed5b402 100644 --- a/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/psr-18/lib/ObjectSerializer.php @@ -338,7 +338,7 @@ public static function toFormValue($value) * If it's a datetime object, format it in ISO8601 * If it's a boolean, convert it to "true" or "false". * - * @param string|bool|\DateTime $value the value of the parameter + * @param float|int|bool|\DateTime $value the value of the parameter * * @return string the header string */