@@ -25,12 +25,12 @@ class ObjectSerializer
2525 * Serialize data
2626 *
2727 * @param mixed $data the data to serialize
28- * @param string $type the OpenAPIToolsType of the data
29- * @param string $format the format of the OpenAPITools type of the data
28+ * @param string|null $type the OpenAPIToolsType of the data
29+ * @param string|null $format the format of the OpenAPITools type of the data
3030 *
3131 * @return scalar|object|array|null serialized form of $data
3232 */
33- public static function sanitizeForSerialization($data, $type = null, $format = null)
33+ public static function sanitizeForSerialization($data, ?string $type = null, ?string $format = null)
3434 {
3535 if (is_scalar($data ) || null === $data ) {
3636 return $data ;
@@ -153,12 +153,12 @@ class ObjectSerializer
153153 *
154154 * @param mixed $data object or primitive to be deserialized
155155 * @param string $class class name is passed as a string
156- * @param string[] $httpHeaders HTTP headers
157- * @param string $discriminator discriminator if polymorphism is used
156+ * @param string[]|null $httpHeaders HTTP headers
157+ * @param string|null $discriminator discriminator if polymorphism is used
158158 *
159159 * @return object|array|null a single or an array of $class instances
160160 */
161- public static function deserialize($data, $class, $httpHeaders = null)
161+ public static function deserialize($data, string $class, ?array $httpHeaders = null, ?string $discriminator = null)
162162 {
163163 if (null === $data ) {
164164 return null;
0 commit comments