forked from loafle/openapi-generator-original
[php-*] Explicitly declare nullable parameters (#20524)
* [php-nextgen] Explicitly declare nullable parameters explicitly * Fix some deprecation warnings in other php generators * [php-nextgen] Fix PHP 8.4 deprecation warnings with nullable/optional array parameters
This commit is contained in:
parent
ad8de61143
commit
a68ad56ea9
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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 = [];
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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.
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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 = [];
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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"]]);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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"]]);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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 = [];
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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"]]);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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"]]);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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(
|
||||
|
@ -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(
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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 = [];
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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');
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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');
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user