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 43ea920fe50..5354e5c3106 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 class PhpNextgenClientCodegen extends AbstractPhpCodegen { } for (CodegenParameter param : operation.allParams) { + String paramType; if (param.isArray || param.isMap) { - param.vendorExtensions.putIfAbsent("x-php-param-type", "array"); + paramType = "array"; } else { - String paramType = param.dataType; - if ((!param.required || param.isNullable) && !paramType.equals("mixed")) { // optional or nullable but not mixed - paramType = "?" + paramType; - } - param.vendorExtensions.putIfAbsent("x-php-param-type", paramType); + paramType = param.dataType; } + if ((!param.required || param.isNullable) && !paramType.equals("mixed")) { // optional or nullable but not mixed + paramType = "?" + paramType; + } + param.vendorExtensions.putIfAbsent("x-php-param-type", paramType); } } diff --git a/modules/openapi-generator/src/main/resources/php-dt-modern/ApiClientFactory.php.mustache b/modules/openapi-generator/src/main/resources/php-dt-modern/ApiClientFactory.php.mustache index 4e0de71da94..94ebdf78407 100644 --- a/modules/openapi-generator/src/main/resources/php-dt-modern/ApiClientFactory.php.mustache +++ b/modules/openapi-generator/src/main/resources/php-dt-modern/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-dt/ApiClientFactory.php.mustache b/modules/openapi-generator/src/main/resources/php-dt/ApiClientFactory.php.mustache index 4e0de71da94..94ebdf78407 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 c517b693604..f1244bbc7f4 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 bee7ad98a78..d8efc1a1b55 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 618276f51b1..4a5119de1d8 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 9c57c887441..4317aaf327a 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 bdbe28f85c5..7d679de68df 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 c81f28e4190..06ff303fe6e 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 b938a95968e..8f8de87fb5d 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 6e01f649d05..a1a66cf428e 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 @@ class BodyApi * @return string */ public function testEchoBodyFreeFormObjectResponseString( - array $body = null, + ?array $body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0] ): string { @@ -1766,7 +1766,7 @@ class BodyApi * @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 @@ class BodyApi * @return PromiseInterface */ public function testEchoBodyFreeFormObjectResponseStringAsync( - array $body = null, + ?array $body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0] ): PromiseInterface { @@ -1917,7 +1917,7 @@ class BodyApi * @return PromiseInterface */ public function testEchoBodyFreeFormObjectResponseStringAsyncWithHttpInfo( - array $body = null, + ?array $body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0] ): PromiseInterface { @@ -1970,7 +1970,7 @@ class BodyApi * @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 b0908215636..17a70483e93 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 b4bd75cc621..66b624d99f0 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 577a9ce2510..b172b7e2ca5 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 3a91c48f9ee..83daaa34b67 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 @@ class QueryApi * @return string */ public function testQueryStyleFormExplodeFalseArrayInteger( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayInteger'][0] ): string { @@ -1874,7 +1874,7 @@ class QueryApi * @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 @@ class QueryApi * @return PromiseInterface */ public function testQueryStyleFormExplodeFalseArrayIntegerAsync( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayInteger'][0] ): PromiseInterface { @@ -2025,7 +2025,7 @@ class QueryApi * @return PromiseInterface */ public function testQueryStyleFormExplodeFalseArrayIntegerAsyncWithHttpInfo( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayInteger'][0] ): PromiseInterface { @@ -2078,7 +2078,7 @@ class QueryApi * @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 @@ class QueryApi * @return string */ public function testQueryStyleFormExplodeFalseArrayString( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayString'][0] ): string { @@ -2192,7 +2192,7 @@ class QueryApi * @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 @@ class QueryApi * @return PromiseInterface */ public function testQueryStyleFormExplodeFalseArrayStringAsync( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayString'][0] ): PromiseInterface { @@ -2343,7 +2343,7 @@ class QueryApi * @return PromiseInterface */ public function testQueryStyleFormExplodeFalseArrayStringAsyncWithHttpInfo( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayString'][0] ): PromiseInterface { @@ -2396,7 +2396,7 @@ class QueryApi * @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 ae7b85f4813..70e55dd1818 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 @@ 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/samples/client/echo_api/php-nextgen-streaming/src/Model/Bird.php b/samples/client/echo_api/php-nextgen-streaming/src/Model/Bird.php index b394383b5f4..0db8bf2ea6e 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 @@ class Bird implements ModelInterface, ArrayAccess, JsonSerializable * * @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 3ff8c72b4d7..64c091555c7 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 @@ class Category implements ModelInterface, ArrayAccess, JsonSerializable * * @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 a9b94be6126..a2b931e5aed 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 @@ class DataQuery extends Query * * @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 c05b7828c43..ffba2c39486 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 @@ class DefaultValue implements ModelInterface, ArrayAccess, JsonSerializable * * @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 e9659149988..d73348caae8 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 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, JsonSerializa * * @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 d3bcfc92864..8ff05ebc0a8 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 @@ class Pet implements ModelInterface, ArrayAccess, JsonSerializable * * @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 8bda6431741..49b71d7b1ee 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 @@ class Query implements ModelInterface, ArrayAccess, JsonSerializable * * @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 94ab33a8a11..486b73365c3 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 @@ class Tag implements ModelInterface, ArrayAccess, JsonSerializable * * @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 f3f21a5956e..4b8b2443a91 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 @@ class TestFormObjectMultipartRequestMarker implements ModelInterface, ArrayAcces * * @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 b8011c70a18..7fc82f05c2c 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 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme * * @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 7c73ed1344c..899393dca7b 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 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo * * @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 1a1e0c5b832..c76724d4587 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 @@ 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; @@ -398,7 +398,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/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php index b938a95968e..8f8de87fb5d 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 71f4be9f015..cbee906dcda 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 @@ class BodyApi * @return string */ public function testEchoBodyFreeFormObjectResponseString( - array $body = null, + ?array $body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0] ): string { @@ -1766,7 +1766,7 @@ class BodyApi * @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 @@ class BodyApi * @return PromiseInterface */ public function testEchoBodyFreeFormObjectResponseStringAsync( - array $body = null, + ?array $body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0] ): PromiseInterface { @@ -1917,7 +1917,7 @@ class BodyApi * @return PromiseInterface */ public function testEchoBodyFreeFormObjectResponseStringAsyncWithHttpInfo( - array $body = null, + ?array $body = null, string $contentType = self::contentTypes['testEchoBodyFreeFormObjectResponseString'][0] ): PromiseInterface { @@ -1970,7 +1970,7 @@ class BodyApi * @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 b0908215636..17a70483e93 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 b4bd75cc621..66b624d99f0 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 577a9ce2510..b172b7e2ca5 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 3a91c48f9ee..83daaa34b67 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 @@ class QueryApi * @return string */ public function testQueryStyleFormExplodeFalseArrayInteger( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayInteger'][0] ): string { @@ -1874,7 +1874,7 @@ class QueryApi * @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 @@ class QueryApi * @return PromiseInterface */ public function testQueryStyleFormExplodeFalseArrayIntegerAsync( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayInteger'][0] ): PromiseInterface { @@ -2025,7 +2025,7 @@ class QueryApi * @return PromiseInterface */ public function testQueryStyleFormExplodeFalseArrayIntegerAsyncWithHttpInfo( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayInteger'][0] ): PromiseInterface { @@ -2078,7 +2078,7 @@ class QueryApi * @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 @@ class QueryApi * @return string */ public function testQueryStyleFormExplodeFalseArrayString( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayString'][0] ): string { @@ -2192,7 +2192,7 @@ class QueryApi * @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 @@ class QueryApi * @return PromiseInterface */ public function testQueryStyleFormExplodeFalseArrayStringAsync( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayString'][0] ): PromiseInterface { @@ -2343,7 +2343,7 @@ class QueryApi * @return PromiseInterface */ public function testQueryStyleFormExplodeFalseArrayStringAsyncWithHttpInfo( - array $query_object = null, + ?array $query_object = null, string $contentType = self::contentTypes['testQueryStyleFormExplodeFalseArrayString'][0] ): PromiseInterface { @@ -2396,7 +2396,7 @@ class QueryApi * @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 ae7b85f4813..70e55dd1818 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 @@ 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/samples/client/echo_api/php-nextgen/src/Model/Bird.php b/samples/client/echo_api/php-nextgen/src/Model/Bird.php index b394383b5f4..0db8bf2ea6e 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 @@ class Bird implements ModelInterface, ArrayAccess, JsonSerializable * * @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 3ff8c72b4d7..64c091555c7 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 @@ class Category implements ModelInterface, ArrayAccess, JsonSerializable * * @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 a9b94be6126..a2b931e5aed 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 @@ class DataQuery extends Query * * @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 c05b7828c43..ffba2c39486 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 @@ class DefaultValue implements ModelInterface, ArrayAccess, JsonSerializable * * @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 e9659149988..d73348caae8 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 @@ class NumberPropertiesOnly implements ModelInterface, ArrayAccess, JsonSerializa * * @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 d3bcfc92864..8ff05ebc0a8 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 @@ class Pet implements ModelInterface, ArrayAccess, JsonSerializable * * @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 8bda6431741..49b71d7b1ee 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 @@ class Query implements ModelInterface, ArrayAccess, JsonSerializable * * @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 94ab33a8a11..486b73365c3 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 @@ class Tag implements ModelInterface, ArrayAccess, JsonSerializable * * @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 f3f21a5956e..4b8b2443a91 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 @@ class TestFormObjectMultipartRequestMarker implements ModelInterface, ArrayAcces * * @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 b8011c70a18..7fc82f05c2c 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 @@ class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter impleme * * @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 7c73ed1344c..899393dca7b 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 @@ class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter implements Mo * * @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 1a1e0c5b832..c76724d4587 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 @@ 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; @@ -398,7 +398,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/samples/client/petstore/php-dt-modern/src/App/ApiClientFactory.php b/samples/client/petstore/php-dt-modern/src/App/ApiClientFactory.php index 03ca27c58ee..fd5b72ba4d2 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 @@ 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/samples/client/petstore/php-dt/src/App/ApiClientFactory.php b/samples/client/petstore/php-dt/src/App/ApiClientFactory.php index 03ca27c58ee..fd5b72ba4d2 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 @@ 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/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php index 986db424001..6e6ad0f6d52 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 fc917db4766..faf8c89f39a 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 31de89ed846..a19ddcfdb56 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 @@ class FakeApi * @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 @@ class FakeApi * @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 @@ class FakeApi * @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 @@ class FakeApi * @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 @@ class FakeApi * @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 @@ class FakeApi array $url, array $context, string $allow_empty, - array $language = null, + ?array $language = null, string $contentType = self::contentTypes['testQueryParameterCollectionFormat'][0] ): void { @@ -6399,7 +6399,7 @@ class FakeApi array $url, array $context, string $allow_empty, - array $language = null, + ?array $language = null, string $contentType = self::contentTypes['testQueryParameterCollectionFormat'][0] ): array { @@ -6459,7 +6459,7 @@ class FakeApi array $url, array $context, string $allow_empty, - array $language = null, + ?array $language = null, string $contentType = self::contentTypes['testQueryParameterCollectionFormat'][0] ): PromiseInterface { @@ -6493,7 +6493,7 @@ class FakeApi array $url, array $context, string $allow_empty, - array $language = null, + ?array $language = null, string $contentType = self::contentTypes['testQueryParameterCollectionFormat'][0] ): PromiseInterface { @@ -6545,7 +6545,7 @@ class FakeApi 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 9b6248438e7..53aa2559585 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 b67bfb33e71..ee8285375e5 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 d94fa7e073a..61009b0cd62 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 e5912366560..9a899b720a8 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 a0bb1a1f41f..64962fb0c9d 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 @@ 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/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Model/AdditionalPropertiesClass.php index c81ab29e9e3..a0818b4314f 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 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess, JsonSeri * * @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 be2c10d4b5d..3f8f5e57b83 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 @@ class AllOfWithSingleRef implements ModelInterface, ArrayAccess, JsonSerializabl * * @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 6cfe803a9b9..5a931370c4f 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 @@ class Animal implements ModelInterface, ArrayAccess, JsonSerializable * * @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 7de86f0d4d2..042c437e888 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 @@ class ApiResponse implements ModelInterface, ArrayAccess, JsonSerializable * * @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 417da0cb6e2..260a0b3fd62 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 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess, JsonSeria * * @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 9c1f27734b5..eb5720b0c65 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 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess, JsonSerializable * * @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 ec5db2291a3..7fa35f704cf 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 @@ class ArrayTest implements ModelInterface, ArrayAccess, JsonSerializable * * @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 ee02084e4d4..c3eca4e7423 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 @@ class Capitalization implements ModelInterface, ArrayAccess, JsonSerializable * * @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 617bdc45b5b..1bc509ef6bd 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 @@ class Cat extends Animal * * @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 7d246661ff1..fc97e525e43 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 @@ class Category implements ModelInterface, ArrayAccess, JsonSerializable * * @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 c78a1010ae3..f845483f922 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 @@ class ChildWithNullable extends ParentWithNullable * * @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 1f0f41c6882..6c889ae6493 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 @@ class ClassModel implements ModelInterface, ArrayAccess, JsonSerializable * * @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 0ab9cf654c6..20a718db68f 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 @@ class Client implements ModelInterface, ArrayAccess, JsonSerializable * * @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 818f24803ea..1d4291efd61 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 @@ class DeprecatedObject implements ModelInterface, ArrayAccess, JsonSerializable * * @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 869f3a31d66..58fa6961fad 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 @@ class Dog extends Animal * * @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 32e7ddb1684..768bc547e37 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 @@ class EnumArrays implements ModelInterface, ArrayAccess, JsonSerializable * * @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 5e5096d22ff..08faf3545da 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 @@ class EnumTest implements ModelInterface, ArrayAccess, JsonSerializable * * @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 26c1c581f84..5ffeeee32a6 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 @@ class FakeBigDecimalMap200Response implements ModelInterface, ArrayAccess, JsonS * * @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 13c17600bdb..d2bc87c0c02 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 @@ class File implements ModelInterface, ArrayAccess, JsonSerializable * * @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 cb590aca656..6c93793b718 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 @@ class FileSchemaTestClass implements ModelInterface, ArrayAccess, JsonSerializab * * @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 a09374e3127..c066a0a588f 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 @@ class Foo implements ModelInterface, ArrayAccess, JsonSerializable * * @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 212876ee903..98a00ac34d5 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 @@ class FooGetDefaultResponse implements ModelInterface, ArrayAccess, JsonSerializ * * @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 55d06c91cf6..2f930b433a7 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 @@ class FormatTest implements ModelInterface, ArrayAccess, JsonSerializable * * @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 d7f8fc2abc5..f7bfac6947c 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 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess, JsonSerializable * * @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 246b9625fee..5ebe3d350de 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 @@ class HealthCheckResult implements ModelInterface, ArrayAccess, JsonSerializable * * @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 562de395460..bcc7830daa1 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 @@ class MapTest implements ModelInterface, ArrayAccess, JsonSerializable * * @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 34b95eff23f..9bdbf6a3b65 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 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr * * @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 f1257488aa9..0ec1e9af3cb 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 @@ class Model200Response implements ModelInterface, ArrayAccess, JsonSerializable * * @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 4e46e28726f..ec23cad4c46 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 @@ class ModelList implements ModelInterface, ArrayAccess, JsonSerializable * * @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 a07bf74896b..dad11ea5fd6 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 @@ class ModelReturn implements ModelInterface, ArrayAccess, JsonSerializable * * @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 62d63c87317..afc0703954a 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 @@ class Name implements ModelInterface, ArrayAccess, JsonSerializable * * @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 25af6b83c3f..f72dbe0f55a 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 @@ class NullableClass implements ModelInterface, ArrayAccess, JsonSerializable * * @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 a7110c6069a..08967bb822a 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 @@ class NumberOnly implements ModelInterface, ArrayAccess, JsonSerializable * * @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 fb50b7521e8..4c874a96e68 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 @@ class ObjectWithDeprecatedFields implements ModelInterface, ArrayAccess, JsonSer * * @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 04081a19f9a..53824f659cb 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 @@ class Order implements ModelInterface, ArrayAccess, JsonSerializable * * @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 e40f6ac0f4c..c5885c5aed1 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 @@ class OuterComposite implements ModelInterface, ArrayAccess, JsonSerializable * * @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 c6f2a03d534..6421e5382b9 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 @@ class OuterObjectWithEnumProperty implements ModelInterface, ArrayAccess, JsonSe * * @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 861f2c6e718..873fd9f5936 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 @@ class ParentWithNullable implements ModelInterface, ArrayAccess, JsonSerializabl * * @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 f2ebc9206da..d75e2ea8d33 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 @@ class Pet implements ModelInterface, ArrayAccess, JsonSerializable * * @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 039f6758c51..8808d8e5c6c 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 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess, JsonSerializable * * @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 fc3091cecd6..15bd3d9b5cb 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 @@ class SpecialModelName implements ModelInterface, ArrayAccess, JsonSerializable * * @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 302b72d4708..f8c499f80a0 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 @@ class Tag implements ModelInterface, ArrayAccess, JsonSerializable * * @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 62b9efe2f90..90128005e60 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 @@ class TestInlineFreeformAdditionalPropertiesRequest implements ModelInterface, A * * @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 e216ccc66fc..c1fe348b10d 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 @@ class User implements ModelInterface, ArrayAccess, JsonSerializable * * @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 ee1b535f18c..87b20e656bf 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 @@ 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; @@ -397,7 +397,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/samples/server/petstore/php-mezzio-ph-modern/src/App/Factory.php b/samples/server/petstore/php-mezzio-ph-modern/src/App/Factory.php index 24eb21b492c..d0a810b86c6 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 @@ 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/samples/server/petstore/php-mezzio-ph/src/App/Factory.php b/samples/server/petstore/php-mezzio-ph/src/App/Factory.php index 8cfe7e295af..87ef7a91822 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 @@ 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();