Skip to content

Commit f431540

Browse files
authored
fix(php): do not cast to string something that's already string (#17838)
1 parent f3ac449 commit f431540

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

modules/openapi-generator/src/main/resources/php/ObjectSerializer.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ class ObjectSerializer
329329
* If it's a datetime object, format it in ISO8601
330330
* If it's a boolean, convert it to "true" or "false".
331331
*
332-
* @param string|bool|\DateTime $value the value of the parameter
332+
* @param float|int|bool|\DateTime $value the value of the parameter
333333
*
334334
* @return string the header string
335335
*/

samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ public static function toFormValue($value)
338338
* If it's a datetime object, format it in ISO8601
339339
* If it's a boolean, convert it to "true" or "false".
340340
*
341-
* @param string|bool|\DateTime $value the value of the parameter
341+
* @param float|int|bool|\DateTime $value the value of the parameter
342342
*
343343
* @return string the header string
344344
*/

samples/client/petstore/php/psr-18/lib/ObjectSerializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ public static function toFormValue($value)
338338
* If it's a datetime object, format it in ISO8601
339339
* If it's a boolean, convert it to "true" or "false".
340340
*
341-
* @param string|bool|\DateTime $value the value of the parameter
341+
* @param float|int|bool|\DateTime $value the value of the parameter
342342
*
343343
* @return string the header string
344344
*/

0 commit comments

Comments
 (0)