Skip to content

Commit 88bf5f0

Browse files
committed
Update templates
1 parent 9a412fc commit 88bf5f0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

templates/ObjectSerializer.mustache

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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;

templates/api_parameters.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
{{! Path and body are required, followed by optional query string and request options }}
2-
{{#pathParams}}{{{dataType}}} ${{baseName}}, {{/pathParams}}{{#bodyParams}}{{{dataType}}} ${{#lambda.camelcase}}{{paramName}}{{/lambda.camelcase}}, {{/bodyParams}}array $requestOptions = null
2+
{{#pathParams}}{{{dataType}}} ${{baseName}}, {{/pathParams}}{{#bodyParams}}{{{dataType}}} ${{#lambda.camelcase}}{{paramName}}{{/lambda.camelcase}}, {{/bodyParams}}?array $requestOptions = null

0 commit comments

Comments
 (0)