diff --git a/modules/swagger-codegen/src/main/resources/php/APIClient.mustache b/modules/swagger-codegen/src/main/resources/php/APIClient.mustache index 3af1fcbad34..c6bc45bc6af 100644 --- a/modules/swagger-codegen/src/main/resources/php/APIClient.mustache +++ b/modules/swagger-codegen/src/main/resources/php/APIClient.mustache @@ -282,7 +282,7 @@ class APIClient { $deserialized = $values; } elseif ($class == 'DateTime') { $deserialized = new \DateTime($data); - } elseif (in_array($class, array('string', 'int', 'float', 'bool'))) { + } elseif (in_array($class, array('string', 'int', 'float', 'double', 'bool'))) { settype($data, $class); $deserialized = $data; } else { diff --git a/samples/client/petstore/php/SwaggerPetstore-php/lib/APIClient.php b/samples/client/petstore/php/SwaggerPetstore-php/lib/APIClient.php index f5a1ec18a33..681bb8cee3c 100644 --- a/samples/client/petstore/php/SwaggerPetstore-php/lib/APIClient.php +++ b/samples/client/petstore/php/SwaggerPetstore-php/lib/APIClient.php @@ -282,7 +282,7 @@ class APIClient { $deserialized = $values; } elseif ($class == 'DateTime') { $deserialized = new \DateTime($data); - } elseif (in_array($class, array('string', 'int', 'float', 'bool'))) { + } elseif (in_array($class, array('string', 'int', 'float', 'double', 'bool'))) { settype($data, $class); $deserialized = $data; } else {