diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpNextgenClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpNextgenClientCodegen.java index 43ea920fe504..5354e5c31061 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpNextgenClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PhpNextgenClientCodegen.java @@ -211,15 +211,16 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, ListconfigKey = $configKey; } - public function __invoke(ContainerInterface $container, $requestedName, array $options = null): ApiClient + public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): ApiClient { $config = new OAGAC\ApiClientOptions(\array_merge($this->getServiceConfig($container), $options ?? [])); return new ApiClient( diff --git a/modules/openapi-generator/src/main/resources/php-dt/ApiClientFactory.php.mustache b/modules/openapi-generator/src/main/resources/php-dt/ApiClientFactory.php.mustache index 4e0de71da944..94ebdf78407b 100644 --- a/modules/openapi-generator/src/main/resources/php-dt/ApiClientFactory.php.mustache +++ b/modules/openapi-generator/src/main/resources/php-dt/ApiClientFactory.php.mustache @@ -16,7 +16,7 @@ class ApiClientFactory implements PM\ServiceFactoryInterface $this->configKey = $configKey; } - public function __invoke(ContainerInterface $container, $requestedName, array $options = null): ApiClient + public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): ApiClient { $config = new OAGAC\ApiClientOptions(\array_merge($this->getServiceConfig($container), $options ?? [])); return new ApiClient( diff --git a/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/Factory.php.mustache b/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/Factory.php.mustache index c517b6936044..f1244bbc7f4a 100644 --- a/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/Factory.php.mustache +++ b/modules/openapi-generator/src/main/resources/php-mezzio-ph-modern/Factory.php.mustache @@ -21,7 +21,7 @@ use Laminas\Stratigility\MiddlewarePipe; class Factory implements FactoryInterface { - public function __invoke(ContainerInterface $container, $requestedName, array $options = null): Application + public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): Application { $errorMiddleware = self::getErrorMiddleware($container); $pipeline = new MiddlewarePipe(); diff --git a/modules/openapi-generator/src/main/resources/php-mezzio-ph/Factory.php.mustache b/modules/openapi-generator/src/main/resources/php-mezzio-ph/Factory.php.mustache index bee7ad98a781..d8efc1a1b551 100644 --- a/modules/openapi-generator/src/main/resources/php-mezzio-ph/Factory.php.mustache +++ b/modules/openapi-generator/src/main/resources/php-mezzio-ph/Factory.php.mustache @@ -21,7 +21,7 @@ use Laminas\Stratigility\MiddlewarePipe; class Factory implements FactoryInterface { - public function __invoke(ContainerInterface $container, $requestedName, array $options = null): Application + public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): Application { $errorMiddleware = self::getErrorMiddleware($container); $pipeline = new MiddlewarePipe(); diff --git a/modules/openapi-generator/src/main/resources/php-nextgen/Configuration.mustache b/modules/openapi-generator/src/main/resources/php-nextgen/Configuration.mustache index 618276f51b1b..4a5119de1d83 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/Configuration.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/Configuration.mustache @@ -498,7 +498,7 @@ class Configuration * @param array|null $variables hash of variable and the corresponding value (optional) * @return string URL based on host settings */ - public static function getHostString(array $hostSettings, int $hostIndex, array $variables = null): string + public static function getHostString(array $hostSettings, int $hostIndex, ?array $variables = null): string { if (null === $variables) { $variables = []; diff --git a/modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache b/modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache index 9c57c887441e..4317aaf327ad 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/ObjectSerializer.mustache @@ -56,7 +56,7 @@ class ObjectSerializer * * @return scalar|object|array|null serialized form of $data */ - public static function sanitizeForSerialization(mixed $data, string $type = null, string $format = null): mixed + public static function sanitizeForSerialization(mixed $data, ?string $type = null, ?string $format = null): mixed { if (is_scalar($data) || null === $data) { return $data; @@ -388,7 +388,7 @@ class ObjectSerializer * * @return mixed a single or an array of $class instances */ - public static function deserialize(mixed $data, string $class, array $httpHeaders = null): mixed + public static function deserialize(mixed $data, string $class, ?array $httpHeaders = null): mixed { if (null === $data) { return null; diff --git a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache index bdbe28f85c5c..7d679de68df8 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache @@ -76,9 +76,9 @@ use {{invokerPackage}}\ObjectSerializer; * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/modules/openapi-generator/src/main/resources/php-nextgen/model_generic.mustache b/modules/openapi-generator/src/main/resources/php-nextgen/model_generic.mustache index c81f28e4190c..06ff303fe6e7 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/model_generic.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/model_generic.mustache @@ -245,7 +245,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}}{{/parentSchema}}{{^par * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { {{#discriminator}} // Initialize discriminator property with the model name. diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php index b938a95968ee..8f8de87fb5db 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php @@ -87,9 +87,9 @@ class AuthApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php index 6e01f649d05e..a1a66cf428e3 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php @@ -111,9 +111,9 @@ class BodyApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -1745,7 +1745,7 @@ public function testEchoBodyAllOfPetRequest( * @return string */ public function testEchoBodyFreeFormObjectResponseString( - array $body = null, + ?array $body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0] ): string { @@ -1766,7 +1766,7 @@ public function testEchoBodyFreeFormObjectResponseString( * @return array of string, HTTP status code, HTTP response headers (array of strings) */ public function testEchoBodyFreeFormObjectResponseStringWithHttpInfo( - array $body = null, + ?array $body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0] ): array { @@ -1893,7 +1893,7 @@ public function testEchoBodyFreeFormObjectResponseStringWithHttpInfo( * @return PromiseInterface */ public function testEchoBodyFreeFormObjectResponseStringAsync( - array $body = null, + ?array $body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0] ): PromiseInterface { @@ -1917,7 +1917,7 @@ function ($response) { * @return PromiseInterface */ public function testEchoBodyFreeFormObjectResponseStringAsyncWithHttpInfo( - array $body = null, + ?array $body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0] ): PromiseInterface { @@ -1970,7 +1970,7 @@ function ($exception) { * @return \GuzzleHttp\Psr7\Request */ public function testEchoBodyFreeFormObjectResponseStringRequest( - array $body = null, + ?array $body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0] ): Request { diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php index b0908215636b..17a70483e933 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php @@ -90,9 +90,9 @@ class FormApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php index b4bd75cc6212..66b624d99f0d 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php @@ -84,9 +84,9 @@ class HeaderApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php index 577a9ce25101..b172b7e2ca5d 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php @@ -84,9 +84,9 @@ class PathApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php index 3a91c48f9ee7..83daaa34b67c 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php @@ -111,9 +111,9 @@ class QueryApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -1853,7 +1853,7 @@ public function testQueryStyleDeepObjectExplodeTrueObjectAllOfRequest( * @return string */ public function testQueryStyleFormExplodeFalseArrayInteger( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayInteger'][0] ): string { @@ -1874,7 +1874,7 @@ public function testQueryStyleFormExplodeFalseArrayInteger( * @return array of string, HTTP status code, HTTP response headers (array of strings) */ public function testQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayInteger'][0] ): array { @@ -2001,7 +2001,7 @@ public function testQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo( * @return PromiseInterface */ public function testQueryStyleFormExplodeFalseArrayIntegerAsync( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayInteger'][0] ): PromiseInterface { @@ -2025,7 +2025,7 @@ function ($response) { * @return PromiseInterface */ public function testQueryStyleFormExplodeFalseArrayIntegerAsyncWithHttpInfo( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayInteger'][0] ): PromiseInterface { @@ -2078,7 +2078,7 @@ function ($exception) { * @return \GuzzleHttp\Psr7\Request */ public function testQueryStyleFormExplodeFalseArrayIntegerRequest( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayInteger'][0] ): Request { @@ -2171,7 +2171,7 @@ public function testQueryStyleFormExplodeFalseArrayIntegerRequest( * @return string */ public function testQueryStyleFormExplodeFalseArrayString( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayString'][0] ): string { @@ -2192,7 +2192,7 @@ public function testQueryStyleFormExplodeFalseArrayString( * @return array of string, HTTP status code, HTTP response headers (array of strings) */ public function testQueryStyleFormExplodeFalseArrayStringWithHttpInfo( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayString'][0] ): array { @@ -2319,7 +2319,7 @@ public function testQueryStyleFormExplodeFalseArrayStringWithHttpInfo( * @return PromiseInterface */ public function testQueryStyleFormExplodeFalseArrayStringAsync( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayString'][0] ): PromiseInterface { @@ -2343,7 +2343,7 @@ function ($response) { * @return PromiseInterface */ public function testQueryStyleFormExplodeFalseArrayStringAsyncWithHttpInfo( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayString'][0] ): PromiseInterface { @@ -2396,7 +2396,7 @@ function ($exception) { * @return \GuzzleHttp\Psr7\Request */ public function testQueryStyleFormExplodeFalseArrayStringRequest( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayString'][0] ): Request { diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Configuration.php b/samples/client/echo_api/php-nextgen-streaming/src/Configuration.php index ae7b85f4813e..70e55dd1818f 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Configuration.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Configuration.php @@ -482,7 +482,7 @@ public function getHostSettings(): array * @param array|null $variables hash of variable and the corresponding value (optional) * @return string URL based on host settings */ - public static function getHostString(array $hostSettings, int $hostIndex, array $variables = null): string + public static function getHostString(array $hostSettings, int $hostIndex, ?array $variables = null): string { if (null === $variables) { $variables = []; diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Model/Bird.php b/samples/client/echo_api/php-nextgen-streaming/src/Model/Bird.php index b394383b5f43..0db8bf2ea6ed 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Model/Bird.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Model/Bird.php @@ -247,7 +247,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('size', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Model/Category.php b/samples/client/echo_api/php-nextgen-streaming/src/Model/Category.php index 3ff8c72b4d7a..64c091555c73 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Model/Category.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Model/Category.php @@ -247,7 +247,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Model/DataQuery.php b/samples/client/echo_api/php-nextgen-streaming/src/Model/DataQuery.php index a9b94be61262..a2b931e5aede 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Model/DataQuery.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Model/DataQuery.php @@ -241,7 +241,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Model/DefaultValue.php b/samples/client/echo_api/php-nextgen-streaming/src/Model/DefaultValue.php index c05b7828c430..ffba2c394862 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Model/DefaultValue.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Model/DefaultValue.php @@ -301,7 +301,7 @@ public function getArrayStringEnumDefaultAllowableValues() * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('array_string_enum_ref_default', $data ?? [], [["success","failure"]]); $this->setIfExists('array_string_enum_default', $data ?? [], [["success","failure"]]); diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Model/NumberPropertiesOnly.php b/samples/client/echo_api/php-nextgen-streaming/src/Model/NumberPropertiesOnly.php index e9659149988c..d73348caae84 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Model/NumberPropertiesOnly.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Model/NumberPropertiesOnly.php @@ -253,7 +253,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('number', $data ?? [], null); $this->setIfExists('float', $data ?? [], null); diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Model/Pet.php b/samples/client/echo_api/php-nextgen-streaming/src/Model/Pet.php index d3bcfc928640..8ff05ebc0a8a 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Model/Pet.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Model/Pet.php @@ -288,7 +288,7 @@ public function getStatusAllowableValues() * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Model/Query.php b/samples/client/echo_api/php-nextgen-streaming/src/Model/Query.php index 8bda64317410..49b71d7b1ee1 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Model/Query.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Model/Query.php @@ -264,7 +264,7 @@ public function getOutcomesAllowableValues() * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('outcomes', $data ?? [], [["SUCCESS","FAILURE"]]); diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Model/Tag.php b/samples/client/echo_api/php-nextgen-streaming/src/Model/Tag.php index 94ab33a8a110..486b73365c3e 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Model/Tag.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Model/Tag.php @@ -247,7 +247,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Model/TestFormObjectMultipartRequestMarker.php b/samples/client/echo_api/php-nextgen-streaming/src/Model/TestFormObjectMultipartRequestMarker.php index f3f21a5956e9..4b8b2443a917 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Model/TestFormObjectMultipartRequestMarker.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Model/TestFormObjectMultipartRequestMarker.php @@ -241,7 +241,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); } diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php b/samples/client/echo_api/php-nextgen-streaming/src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php index b8011c70a188..7fc82f05c2ca 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php @@ -259,7 +259,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('size', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php b/samples/client/echo_api/php-nextgen-streaming/src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php index 7c73ed1344cf..899393dca7b3 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php @@ -241,7 +241,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('values', $data ?? [], null); } diff --git a/samples/client/echo_api/php-nextgen-streaming/src/ObjectSerializer.php b/samples/client/echo_api/php-nextgen-streaming/src/ObjectSerializer.php index 1a1e0c5b832e..c76724d45873 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/ObjectSerializer.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/ObjectSerializer.php @@ -66,7 +66,7 @@ public static function setDateTimeFormat(string $format): void * * @return scalar|object|array|null serialized form of $data */ - public static function sanitizeForSerialization(mixed $data, string $type = null, string $format = null): mixed + public static function sanitizeForSerialization(mixed $data, ?string $type = null, ?string $format = null): mixed { if (is_scalar($data) || null === $data) { return $data; @@ -398,7 +398,7 @@ public static function serializeCollection(array $collection, string $style, boo * * @return mixed a single or an array of $class instances */ - public static function deserialize(mixed $data, string $class, array $httpHeaders = null): mixed + public static function deserialize(mixed $data, string $class, ?array $httpHeaders = null): mixed { if (null === $data) { return null; diff --git a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php index b938a95968ee..8f8de87fb5db 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php @@ -87,9 +87,9 @@ class AuthApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php index 71f4be9f0159..cbee906dcdad 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php @@ -111,9 +111,9 @@ class BodyApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -1745,7 +1745,7 @@ public function testEchoBodyAllOfPetRequest( * @return string */ public function testEchoBodyFreeFormObjectResponseString( - array $body = null, + ?array $body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0] ): string { @@ -1766,7 +1766,7 @@ public function testEchoBodyFreeFormObjectResponseString( * @return array of string, HTTP status code, HTTP response headers (array of strings) */ public function testEchoBodyFreeFormObjectResponseStringWithHttpInfo( - array $body = null, + ?array $body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0] ): array { @@ -1893,7 +1893,7 @@ public function testEchoBodyFreeFormObjectResponseStringWithHttpInfo( * @return PromiseInterface */ public function testEchoBodyFreeFormObjectResponseStringAsync( - array $body = null, + ?array $body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0] ): PromiseInterface { @@ -1917,7 +1917,7 @@ function ($response) { * @return PromiseInterface */ public function testEchoBodyFreeFormObjectResponseStringAsyncWithHttpInfo( - array $body = null, + ?array $body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0] ): PromiseInterface { @@ -1970,7 +1970,7 @@ function ($exception) { * @return \GuzzleHttp\Psr7\Request */ public function testEchoBodyFreeFormObjectResponseStringRequest( - array $body = null, + ?array $body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0] ): Request { diff --git a/samples/client/echo_api/php-nextgen/src/Api/FormApi.php b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php index b0908215636b..17a70483e933 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/FormApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php @@ -90,9 +90,9 @@ class FormApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php index b4bd75cc6212..66b624d99f0d 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php @@ -84,9 +84,9 @@ class HeaderApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php index 577a9ce25101..b172b7e2ca5d 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php @@ -84,9 +84,9 @@ class PathApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php index 3a91c48f9ee7..83daaa34b67c 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php @@ -111,9 +111,9 @@ class QueryApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -1853,7 +1853,7 @@ public function testQueryStyleDeepObjectExplodeTrueObjectAllOfRequest( * @return string */ public function testQueryStyleFormExplodeFalseArrayInteger( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayInteger'][0] ): string { @@ -1874,7 +1874,7 @@ public function testQueryStyleFormExplodeFalseArrayInteger( * @return array of string, HTTP status code, HTTP response headers (array of strings) */ public function testQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayInteger'][0] ): array { @@ -2001,7 +2001,7 @@ public function testQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo( * @return PromiseInterface */ public function testQueryStyleFormExplodeFalseArrayIntegerAsync( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayInteger'][0] ): PromiseInterface { @@ -2025,7 +2025,7 @@ function ($response) { * @return PromiseInterface */ public function testQueryStyleFormExplodeFalseArrayIntegerAsyncWithHttpInfo( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayInteger'][0] ): PromiseInterface { @@ -2078,7 +2078,7 @@ function ($exception) { * @return \GuzzleHttp\Psr7\Request */ public function testQueryStyleFormExplodeFalseArrayIntegerRequest( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayInteger'][0] ): Request { @@ -2171,7 +2171,7 @@ public function testQueryStyleFormExplodeFalseArrayIntegerRequest( * @return string */ public function testQueryStyleFormExplodeFalseArrayString( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayString'][0] ): string { @@ -2192,7 +2192,7 @@ public function testQueryStyleFormExplodeFalseArrayString( * @return array of string, HTTP status code, HTTP response headers (array of strings) */ public function testQueryStyleFormExplodeFalseArrayStringWithHttpInfo( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayString'][0] ): array { @@ -2319,7 +2319,7 @@ public function testQueryStyleFormExplodeFalseArrayStringWithHttpInfo( * @return PromiseInterface */ public function testQueryStyleFormExplodeFalseArrayStringAsync( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayString'][0] ): PromiseInterface { @@ -2343,7 +2343,7 @@ function ($response) { * @return PromiseInterface */ public function testQueryStyleFormExplodeFalseArrayStringAsyncWithHttpInfo( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayString'][0] ): PromiseInterface { @@ -2396,7 +2396,7 @@ function ($exception) { * @return \GuzzleHttp\Psr7\Request */ public function testQueryStyleFormExplodeFalseArrayStringRequest( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayString'][0] ): Request { diff --git a/samples/client/echo_api/php-nextgen/src/Configuration.php b/samples/client/echo_api/php-nextgen/src/Configuration.php index ae7b85f4813e..70e55dd1818f 100644 --- a/samples/client/echo_api/php-nextgen/src/Configuration.php +++ b/samples/client/echo_api/php-nextgen/src/Configuration.php @@ -482,7 +482,7 @@ public function getHostSettings(): array * @param array|null $variables hash of variable and the corresponding value (optional) * @return string URL based on host settings */ - public static function getHostString(array $hostSettings, int $hostIndex, array $variables = null): string + public static function getHostString(array $hostSettings, int $hostIndex, ?array $variables = null): string { if (null === $variables) { $variables = []; diff --git a/samples/client/echo_api/php-nextgen/src/Model/Bird.php b/samples/client/echo_api/php-nextgen/src/Model/Bird.php index b394383b5f43..0db8bf2ea6ed 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/Bird.php +++ b/samples/client/echo_api/php-nextgen/src/Model/Bird.php @@ -247,7 +247,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('size', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); diff --git a/samples/client/echo_api/php-nextgen/src/Model/Category.php b/samples/client/echo_api/php-nextgen/src/Model/Category.php index 3ff8c72b4d7a..64c091555c73 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/Category.php +++ b/samples/client/echo_api/php-nextgen/src/Model/Category.php @@ -247,7 +247,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/samples/client/echo_api/php-nextgen/src/Model/DataQuery.php b/samples/client/echo_api/php-nextgen/src/Model/DataQuery.php index a9b94be61262..a2b931e5aede 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/DataQuery.php +++ b/samples/client/echo_api/php-nextgen/src/Model/DataQuery.php @@ -241,7 +241,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/samples/client/echo_api/php-nextgen/src/Model/DefaultValue.php b/samples/client/echo_api/php-nextgen/src/Model/DefaultValue.php index c05b7828c430..ffba2c394862 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/DefaultValue.php +++ b/samples/client/echo_api/php-nextgen/src/Model/DefaultValue.php @@ -301,7 +301,7 @@ public function getArrayStringEnumDefaultAllowableValues() * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('array_string_enum_ref_default', $data ?? [], [["success","failure"]]); $this->setIfExists('array_string_enum_default', $data ?? [], [["success","failure"]]); diff --git a/samples/client/echo_api/php-nextgen/src/Model/NumberPropertiesOnly.php b/samples/client/echo_api/php-nextgen/src/Model/NumberPropertiesOnly.php index e9659149988c..d73348caae84 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/NumberPropertiesOnly.php +++ b/samples/client/echo_api/php-nextgen/src/Model/NumberPropertiesOnly.php @@ -253,7 +253,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('number', $data ?? [], null); $this->setIfExists('float', $data ?? [], null); diff --git a/samples/client/echo_api/php-nextgen/src/Model/Pet.php b/samples/client/echo_api/php-nextgen/src/Model/Pet.php index d3bcfc928640..8ff05ebc0a8a 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/Pet.php +++ b/samples/client/echo_api/php-nextgen/src/Model/Pet.php @@ -288,7 +288,7 @@ public function getStatusAllowableValues() * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/samples/client/echo_api/php-nextgen/src/Model/Query.php b/samples/client/echo_api/php-nextgen/src/Model/Query.php index 8bda64317410..49b71d7b1ee1 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/Query.php +++ b/samples/client/echo_api/php-nextgen/src/Model/Query.php @@ -264,7 +264,7 @@ public function getOutcomesAllowableValues() * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('outcomes', $data ?? [], [["SUCCESS","FAILURE"]]); diff --git a/samples/client/echo_api/php-nextgen/src/Model/Tag.php b/samples/client/echo_api/php-nextgen/src/Model/Tag.php index 94ab33a8a110..486b73365c3e 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/Tag.php +++ b/samples/client/echo_api/php-nextgen/src/Model/Tag.php @@ -247,7 +247,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/samples/client/echo_api/php-nextgen/src/Model/TestFormObjectMultipartRequestMarker.php b/samples/client/echo_api/php-nextgen/src/Model/TestFormObjectMultipartRequestMarker.php index f3f21a5956e9..4b8b2443a917 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/TestFormObjectMultipartRequestMarker.php +++ b/samples/client/echo_api/php-nextgen/src/Model/TestFormObjectMultipartRequestMarker.php @@ -241,7 +241,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); } diff --git a/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php b/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php index b8011c70a188..7fc82f05c2ca 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php +++ b/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.php @@ -259,7 +259,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('size', $data ?? [], null); $this->setIfExists('color', $data ?? [], null); diff --git a/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php b/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php index 7c73ed1344cf..899393dca7b3 100644 --- a/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php +++ b/samples/client/echo_api/php-nextgen/src/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.php @@ -241,7 +241,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('values', $data ?? [], null); } diff --git a/samples/client/echo_api/php-nextgen/src/ObjectSerializer.php b/samples/client/echo_api/php-nextgen/src/ObjectSerializer.php index 1a1e0c5b832e..c76724d45873 100644 --- a/samples/client/echo_api/php-nextgen/src/ObjectSerializer.php +++ b/samples/client/echo_api/php-nextgen/src/ObjectSerializer.php @@ -66,7 +66,7 @@ public static function setDateTimeFormat(string $format): void * * @return scalar|object|array|null serialized form of $data */ - public static function sanitizeForSerialization(mixed $data, string $type = null, string $format = null): mixed + public static function sanitizeForSerialization(mixed $data, ?string $type = null, ?string $format = null): mixed { if (is_scalar($data) || null === $data) { return $data; @@ -398,7 +398,7 @@ public static function serializeCollection(array $collection, string $style, boo * * @return mixed a single or an array of $class instances */ - public static function deserialize(mixed $data, string $class, array $httpHeaders = null): mixed + public static function deserialize(mixed $data, string $class, ?array $httpHeaders = null): mixed { if (null === $data) { return null; diff --git a/samples/client/petstore/php-dt-modern/src/App/ApiClientFactory.php b/samples/client/petstore/php-dt-modern/src/App/ApiClientFactory.php index 03ca27c58ee3..fd5b72ba4d2a 100644 --- a/samples/client/petstore/php-dt-modern/src/App/ApiClientFactory.php +++ b/samples/client/petstore/php-dt-modern/src/App/ApiClientFactory.php @@ -16,7 +16,7 @@ public function __construct(string $configKey = ApiClient::class) $this->configKey = $configKey; } - public function __invoke(ContainerInterface $container, $requestedName, array $options = null): ApiClient + public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): ApiClient { $config = new OAGAC\ApiClientOptions(\array_merge($this->getServiceConfig($container), $options ?? [])); return new ApiClient( diff --git a/samples/client/petstore/php-dt/src/App/ApiClientFactory.php b/samples/client/petstore/php-dt/src/App/ApiClientFactory.php index 03ca27c58ee3..fd5b72ba4d2a 100644 --- a/samples/client/petstore/php-dt/src/App/ApiClientFactory.php +++ b/samples/client/petstore/php-dt/src/App/ApiClientFactory.php @@ -16,7 +16,7 @@ public function __construct(string $configKey = ApiClient::class) $this->configKey = $configKey; } - public function __invoke(ContainerInterface $container, $requestedName, array $options = null): ApiClient + public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): ApiClient { $config = new OAGAC\ApiClientOptions(\array_merge($this->getServiceConfig($container), $options ?? [])); return new ApiClient( diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php index 986db424001d..6e6ad0f6d528 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php @@ -83,9 +83,9 @@ class AnotherFakeApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php index fc917db4766a..faf8c89f39a1 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php @@ -83,9 +83,9 @@ class DefaultApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php index 31de89ed846d..a19ddcfdb56e 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php @@ -150,9 +150,9 @@ class FakeApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); @@ -4728,14 +4728,14 @@ public function testEndpointParametersRequest( * @return void */ public function testEnumParameters( - array $enum_header_string_array = ['$'], + ?array $enum_header_string_array = ['$'], ?string $enum_header_string = '-efg', - array $enum_query_string_array = ['$'], + ?array $enum_query_string_array = ['$'], ?string $enum_query_string = '-efg', ?int $enum_query_integer = null, ?float $enum_query_double = null, - array $enum_query_model_array = null, - array $enum_form_string_array = ['$'], + ?array $enum_query_model_array = null, + ?array $enum_form_string_array = ['$'], ?string $enum_form_string = '-efg', string $contentType = self::contentTypes['testEnumParameters'][0] ): void @@ -4764,14 +4764,14 @@ public function testEnumParameters( * @return array of null, HTTP status code, HTTP response headers (array of strings) */ public function testEnumParametersWithHttpInfo( - array $enum_header_string_array = ['$'], + ?array $enum_header_string_array = ['$'], ?string $enum_header_string = '-efg', - array $enum_query_string_array = ['$'], + ?array $enum_query_string_array = ['$'], ?string $enum_query_string = '-efg', ?int $enum_query_integer = null, ?float $enum_query_double = null, - array $enum_query_model_array = null, - array $enum_form_string_array = ['$'], + ?array $enum_query_model_array = null, + ?array $enum_form_string_array = ['$'], ?string $enum_form_string = '-efg', string $contentType = self::contentTypes['testEnumParameters'][0] ): array @@ -4830,14 +4830,14 @@ public function testEnumParametersWithHttpInfo( * @return PromiseInterface */ public function testEnumParametersAsync( - array $enum_header_string_array = ['$'], + ?array $enum_header_string_array = ['$'], ?string $enum_header_string = '-efg', - array $enum_query_string_array = ['$'], + ?array $enum_query_string_array = ['$'], ?string $enum_query_string = '-efg', ?int $enum_query_integer = null, ?float $enum_query_double = null, - array $enum_query_model_array = null, - array $enum_form_string_array = ['$'], + ?array $enum_query_model_array = null, + ?array $enum_form_string_array = ['$'], ?string $enum_form_string = '-efg', string $contentType = self::contentTypes['testEnumParameters'][0] ): PromiseInterface @@ -4870,14 +4870,14 @@ function ($response) { * @return PromiseInterface */ public function testEnumParametersAsyncWithHttpInfo( - array $enum_header_string_array = ['$'], + ?array $enum_header_string_array = ['$'], ?string $enum_header_string = '-efg', - array $enum_query_string_array = ['$'], + ?array $enum_query_string_array = ['$'], ?string $enum_query_string = '-efg', ?int $enum_query_integer = null, ?float $enum_query_double = null, - array $enum_query_model_array = null, - array $enum_form_string_array = ['$'], + ?array $enum_query_model_array = null, + ?array $enum_form_string_array = ['$'], ?string $enum_form_string = '-efg', string $contentType = self::contentTypes['testEnumParameters'][0] ): PromiseInterface @@ -4926,14 +4926,14 @@ function ($exception) { * @return \GuzzleHttp\Psr7\Request */ public function testEnumParametersRequest( - array $enum_header_string_array = ['$'], + ?array $enum_header_string_array = ['$'], ?string $enum_header_string = '-efg', - array $enum_query_string_array = ['$'], + ?array $enum_query_string_array = ['$'], ?string $enum_query_string = '-efg', ?int $enum_query_integer = null, ?float $enum_query_double = null, - array $enum_query_model_array = null, - array $enum_form_string_array = ['$'], + ?array $enum_query_model_array = null, + ?array $enum_form_string_array = ['$'], ?string $enum_form_string = '-efg', string $contentType = self::contentTypes['testEnumParameters'][0] ): Request @@ -6369,7 +6369,7 @@ public function testQueryParameterCollectionFormat( array $url, array $context, string $allow_empty, - array $language = null, + ?array $language = null, string $contentType = self::contentTypes['testQueryParameterCollectionFormat'][0] ): void { @@ -6399,7 +6399,7 @@ public function testQueryParameterCollectionFormatWithHttpInfo( array $url, array $context, string $allow_empty, - array $language = null, + ?array $language = null, string $contentType = self::contentTypes['testQueryParameterCollectionFormat'][0] ): array { @@ -6459,7 +6459,7 @@ public function testQueryParameterCollectionFormatAsync( array $url, array $context, string $allow_empty, - array $language = null, + ?array $language = null, string $contentType = self::contentTypes['testQueryParameterCollectionFormat'][0] ): PromiseInterface { @@ -6493,7 +6493,7 @@ public function testQueryParameterCollectionFormatAsyncWithHttpInfo( array $url, array $context, string $allow_empty, - array $language = null, + ?array $language = null, string $contentType = self::contentTypes['testQueryParameterCollectionFormat'][0] ): PromiseInterface { @@ -6545,7 +6545,7 @@ public function testQueryParameterCollectionFormatRequest( array $url, array $context, string $allow_empty, - array $language = null, + ?array $language = null, string $contentType = self::contentTypes['testQueryParameterCollectionFormat'][0] ): Request { diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php index 9b6248438e7b..53aa25595856 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php @@ -83,9 +83,9 @@ class FakeClassnameTags123Api * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php index b67bfb33e719..ee8285375e50 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php @@ -109,9 +109,9 @@ class PetApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php index d94fa7e073ac..61009b0cd621 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php @@ -92,9 +92,9 @@ class StoreApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php index e59123665600..9a899b720a8b 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php @@ -104,9 +104,9 @@ class UserApi * @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null, + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null, int $hostIndex = 0 ) { $this->client = $client ?: new Client(); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Configuration.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Configuration.php index a0bb1a1f41f1..64962fb0c9db 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Configuration.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Configuration.php @@ -518,7 +518,7 @@ public function getHostSettings(): array * @param array|null $variables hash of variable and the corresponding value (optional) * @return string URL based on host settings */ - public static function getHostString(array $hostSettings, int $hostIndex, array $variables = null): string + public static function getHostString(array $hostSettings, int $hostIndex, ?array $variables = null): string { if (null === $variables) { $variables = []; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AdditionalPropertiesClass.php index c81ab29e9e37..a0818b4314f7 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AdditionalPropertiesClass.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AdditionalPropertiesClass.php @@ -246,7 +246,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('map_property', $data ?? [], null); $this->setIfExists('map_of_map_property', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AllOfWithSingleRef.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AllOfWithSingleRef.php index be2c10d4b5d3..3f8f5e57b833 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AllOfWithSingleRef.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AllOfWithSingleRef.php @@ -246,7 +246,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('username', $data ?? [], null); $this->setIfExists('single_ref_type', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Animal.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Animal.php index 6cfe803a9b96..5a931370c4fb 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Animal.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Animal.php @@ -248,7 +248,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { // Initialize discriminator property with the model name. $this->container['class_name'] = static::$openAPIModelName; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ApiResponse.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ApiResponse.php index 7de86f0d4d2f..042c437e8887 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ApiResponse.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ApiResponse.php @@ -252,7 +252,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('code', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayOfArrayOfNumberOnly.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayOfArrayOfNumberOnly.php index 417da0cb6e28..260a0b3fd62c 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayOfArrayOfNumberOnly.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayOfArrayOfNumberOnly.php @@ -240,7 +240,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('array_array_number', $data ?? [], null); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayOfNumberOnly.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayOfNumberOnly.php index 9c1f27734b50..eb5720b0c65a 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayOfNumberOnly.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayOfNumberOnly.php @@ -240,7 +240,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('array_number', $data ?? [], null); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayTest.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayTest.php index ec5db2291a39..7fa35f704cfc 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayTest.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ArrayTest.php @@ -252,7 +252,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('array_of_string', $data ?? [], null); $this->setIfExists('array_array_of_integer', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Capitalization.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Capitalization.php index ee02084e4d4c..c3eca4e7423b 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Capitalization.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Capitalization.php @@ -270,7 +270,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('small_camel', $data ?? [], null); $this->setIfExists('capital_camel', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Cat.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Cat.php index 617bdc45b5b1..1bc509ef6bdf 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Cat.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Cat.php @@ -228,7 +228,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Category.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Category.php index 7d246661ff13..fc97e525e43e 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Category.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Category.php @@ -246,7 +246,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], 'default-name'); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ChildWithNullable.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ChildWithNullable.php index c78a1010ae3e..f845483f922f 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ChildWithNullable.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ChildWithNullable.php @@ -228,7 +228,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ClassModel.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ClassModel.php index 1f0f41c6882a..6c889ae64935 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ClassModel.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ClassModel.php @@ -241,7 +241,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('_class', $data ?? [], null); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Client.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Client.php index 0ab9cf654c6f..20a718db68ff 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Client.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Client.php @@ -240,7 +240,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('client', $data ?? [], null); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/DeprecatedObject.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/DeprecatedObject.php index 818f24803eab..1d4291efd616 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/DeprecatedObject.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/DeprecatedObject.php @@ -240,7 +240,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Dog.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Dog.php index 869f3a31d663..58fa6961fad3 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Dog.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Dog.php @@ -228,7 +228,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { parent::__construct($data); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumArrays.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumArrays.php index 32e7ddb16844..768bc547e376 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumArrays.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumArrays.php @@ -276,7 +276,7 @@ public function getArrayEnumAllowableValues() * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('just_symbol', $data ?? [], null); $this->setIfExists('array_enum', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php index 5e5096d22ffa..08faf3545da3 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/EnumTest.php @@ -346,7 +346,7 @@ public function getEnumNumberAllowableValues() * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('enum_string', $data ?? [], null); $this->setIfExists('enum_string_required', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FakeBigDecimalMap200Response.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FakeBigDecimalMap200Response.php index 26c1c581f849..5ffeeee32a61 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FakeBigDecimalMap200Response.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FakeBigDecimalMap200Response.php @@ -246,7 +246,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('some_id', $data ?? [], null); $this->setIfExists('some_map', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/File.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/File.php index 13c17600bdb7..d2bc87c0c02b 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/File.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/File.php @@ -241,7 +241,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('source_uri', $data ?? [], null); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FileSchemaTestClass.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FileSchemaTestClass.php index cb590aca656b..6c93793b718c 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FileSchemaTestClass.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FileSchemaTestClass.php @@ -246,7 +246,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('file', $data ?? [], null); $this->setIfExists('files', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Foo.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Foo.php index a09374e3127f..c066a0a588fd 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Foo.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Foo.php @@ -240,7 +240,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('bar', $data ?? [], 'bar'); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FooGetDefaultResponse.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FooGetDefaultResponse.php index 212876ee9034..98a00ac34d58 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FooGetDefaultResponse.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FooGetDefaultResponse.php @@ -240,7 +240,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('string', $data ?? [], null); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FormatTest.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FormatTest.php index 55d06c91cf69..2f930b433a7f 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FormatTest.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/FormatTest.php @@ -336,7 +336,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('integer', $data ?? [], null); $this->setIfExists('int32', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/HasOnlyReadOnly.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/HasOnlyReadOnly.php index d7f8fc2abc5d..f7bfac6947c3 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/HasOnlyReadOnly.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/HasOnlyReadOnly.php @@ -246,7 +246,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('bar', $data ?? [], null); $this->setIfExists('foo', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/HealthCheckResult.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/HealthCheckResult.php index 246b9625fee5..5ebe3d350dee 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/HealthCheckResult.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/HealthCheckResult.php @@ -241,7 +241,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('nullable_message', $data ?? [], null); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/MapTest.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/MapTest.php index 562de395460d..bcc7830daa1a 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/MapTest.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/MapTest.php @@ -273,7 +273,7 @@ public function getMapOfEnumStringAllowableValues() * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('map_map_of_string', $data ?? [], null); $this->setIfExists('map_of_enum_string', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/MixedPropertiesAndAdditionalPropertiesClass.php index 34b95eff23fb..9bdbf6a3b65b 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/MixedPropertiesAndAdditionalPropertiesClass.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/MixedPropertiesAndAdditionalPropertiesClass.php @@ -252,7 +252,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('uuid', $data ?? [], null); $this->setIfExists('date_time', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Model200Response.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Model200Response.php index f1257488aa99..0ec1e9af3cb1 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Model200Response.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Model200Response.php @@ -247,7 +247,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('class', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelList.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelList.php index 4e46e28726f1..ec23cad4c460 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelList.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelList.php @@ -240,7 +240,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('_123_list', $data ?? [], null); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelReturn.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelReturn.php index a07bf74896be..dad11ea5fd6e 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelReturn.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ModelReturn.php @@ -241,7 +241,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('return', $data ?? [], null); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Name.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Name.php index 62d63c873179..afc0703954ac 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Name.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Name.php @@ -259,7 +259,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('name', $data ?? [], null); $this->setIfExists('snake_case', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/NullableClass.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/NullableClass.php index 25af6b83c3fa..f72dbe0f55af 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/NullableClass.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/NullableClass.php @@ -306,7 +306,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('integer_prop', $data ?? [], null); $this->setIfExists('number_prop', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/NumberOnly.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/NumberOnly.php index a7110c6069a0..08967bb822aa 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/NumberOnly.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/NumberOnly.php @@ -240,7 +240,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('just_number', $data ?? [], null); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ObjectWithDeprecatedFields.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ObjectWithDeprecatedFields.php index fb50b7521e83..4c874a96e68b 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ObjectWithDeprecatedFields.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ObjectWithDeprecatedFields.php @@ -258,7 +258,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('uuid', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Order.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Order.php index 04081a19f9a5..53824f659cb5 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Order.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Order.php @@ -287,7 +287,7 @@ public function getStatusAllowableValues() * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('pet_id', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterComposite.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterComposite.php index e40f6ac0f4c0..c5885c5aed13 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterComposite.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterComposite.php @@ -252,7 +252,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('my_number', $data ?? [], null); $this->setIfExists('my_string', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterObjectWithEnumProperty.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterObjectWithEnumProperty.php index c6f2a03d5344..6421e5382b98 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterObjectWithEnumProperty.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/OuterObjectWithEnumProperty.php @@ -240,7 +240,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('value', $data ?? [], null); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ParentWithNullable.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ParentWithNullable.php index 861f2c6e718c..873fd9f5936b 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ParentWithNullable.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ParentWithNullable.php @@ -259,7 +259,7 @@ public function getTypeAllowableValues() * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { // Initialize discriminator property with the model name. $this->container['type'] = static::$openAPIModelName; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Pet.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Pet.php index f2ebc9206da0..d75e2ea8d33b 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Pet.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Pet.php @@ -287,7 +287,7 @@ public function getStatusAllowableValues() * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('category', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ReadOnlyFirst.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ReadOnlyFirst.php index 039f6758c51f..8808d8e5c6c2 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ReadOnlyFirst.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/ReadOnlyFirst.php @@ -246,7 +246,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('bar', $data ?? [], null); $this->setIfExists('baz', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/SpecialModelName.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/SpecialModelName.php index fc3091cecd64..15bd3d9b5cb3 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/SpecialModelName.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/SpecialModelName.php @@ -240,7 +240,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('special_property_name', $data ?? [], null); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Tag.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Tag.php index 302b72d47088..f8c499f80a05 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Tag.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/Tag.php @@ -246,7 +246,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('name', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/TestInlineFreeformAdditionalPropertiesRequest.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/TestInlineFreeformAdditionalPropertiesRequest.php index 62b9efe2f901..90128005e60b 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/TestInlineFreeformAdditionalPropertiesRequest.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/TestInlineFreeformAdditionalPropertiesRequest.php @@ -240,7 +240,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('some_property', $data ?? [], null); } diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/User.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/User.php index e216ccc66fc7..c1fe348b10d2 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/User.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/User.php @@ -282,7 +282,7 @@ public function getModelName(): string * * @param array $data Associated array of property values initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->setIfExists('id', $data ?? [], null); $this->setIfExists('username', $data ?? [], null); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php index ee1b535f18c0..87b20e656bf0 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/ObjectSerializer.php @@ -65,7 +65,7 @@ public static function setDateTimeFormat(string $format): void * * @return scalar|object|array|null serialized form of $data */ - public static function sanitizeForSerialization(mixed $data, string $type = null, string $format = null): mixed + public static function sanitizeForSerialization(mixed $data, ?string $type = null, ?string $format = null): mixed { if (is_scalar($data) || null === $data) { return $data; @@ -397,7 +397,7 @@ public static function serializeCollection(array $collection, string $style, boo * * @return mixed a single or an array of $class instances */ - public static function deserialize(mixed $data, string $class, array $httpHeaders = null): mixed + public static function deserialize(mixed $data, string $class, ?array $httpHeaders = null): mixed { if (null === $data) { return null; diff --git a/samples/server/petstore/php-mezzio-ph-modern/src/App/Factory.php b/samples/server/petstore/php-mezzio-ph-modern/src/App/Factory.php index 24eb21b492c0..d0a810b86c67 100644 --- a/samples/server/petstore/php-mezzio-ph-modern/src/App/Factory.php +++ b/samples/server/petstore/php-mezzio-ph-modern/src/App/Factory.php @@ -21,7 +21,7 @@ class Factory implements FactoryInterface { - public function __invoke(ContainerInterface $container, $requestedName, array $options = null): Application + public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): Application { $errorMiddleware = self::getErrorMiddleware($container); $pipeline = new MiddlewarePipe(); diff --git a/samples/server/petstore/php-mezzio-ph/src/App/Factory.php b/samples/server/petstore/php-mezzio-ph/src/App/Factory.php index 8cfe7e295afc..87ef7a918223 100644 --- a/samples/server/petstore/php-mezzio-ph/src/App/Factory.php +++ b/samples/server/petstore/php-mezzio-ph/src/App/Factory.php @@ -21,7 +21,7 @@ class Factory implements FactoryInterface { - public function __invoke(ContainerInterface $container, $requestedName, array $options = null): Application + public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): Application { $errorMiddleware = self::getErrorMiddleware($container); $pipeline = new MiddlewarePipe();