[php] Small tweaks for php generator (#7376)

This commit is contained in:
Dalibor Karlović 2020-09-27 11:42:51 +02:00 committed by GitHub
parent a5ee2e0454
commit 2c59f1dc8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
66 changed files with 866 additions and 591 deletions

View File

@ -34,7 +34,7 @@ class ApiException extends Exception
/** /**
* The HTTP body of the server response either as Json or string. * The HTTP body of the server response either as Json or string.
* *
* @var mixed * @var \stdClass|string|null
*/ */
protected $responseBody; protected $responseBody;
@ -48,7 +48,7 @@ class ApiException extends Exception
/** /**
* The deserialized response object * The deserialized response object
* *
* @var $responseObject; * @var \stdClass|string|null
*/ */
protected $responseObject; protected $responseObject;
@ -58,7 +58,7 @@ class ApiException extends Exception
* @param string $message Error message * @param string $message Error message
* @param int $code HTTP status code * @param int $code HTTP status code
* @param string[]|null $responseHeaders HTTP response header * @param string[]|null $responseHeaders HTTP response header
* @param mixed $responseBody HTTP decoded body of the server response either as \stdClass or string * @param \stdClass|string|null $responseBody HTTP decoded body of the server response either as \stdClass or string
*/ */
public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null) public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null)
{ {
@ -80,7 +80,7 @@ class ApiException extends Exception
/** /**
* Gets the HTTP body of the server response either as Json or string * Gets the HTTP body of the server response either as Json or string
* *
* @return mixed HTTP body of the server response either as \stdClass or string * @return \stdClass|string|null HTTP body of the server response either as \stdClass or string
*/ */
public function getResponseBody() public function getResponseBody()
{ {

View File

@ -29,6 +29,9 @@ namespace {{invokerPackage}};
*/ */
class Configuration class Configuration
{ {
/**
* @var Configuration
*/
private static $defaultConfiguration; private static $defaultConfiguration;
/** /**
@ -128,7 +131,7 @@ class Configuration
* *
* @param string $apiKeyIdentifier API key identifier (authentication scheme) * @param string $apiKeyIdentifier API key identifier (authentication scheme)
* *
* @return string API key or token * @return null|string API key or token
*/ */
public function getApiKey($apiKeyIdentifier) public function getApiKey($apiKeyIdentifier)
{ {
@ -154,7 +157,7 @@ class Configuration
* *
* @param string $apiKeyIdentifier API key identifier (authentication scheme) * @param string $apiKeyIdentifier API key identifier (authentication scheme)
* *
* @return string * @return null|string
*/ */
public function getApiKeyPrefix($apiKeyIdentifier) public function getApiKeyPrefix($apiKeyIdentifier)
{ {
@ -400,7 +403,7 @@ class Configuration
* *
* @param string $apiKeyIdentifier name of apikey * @param string $apiKeyIdentifier name of apikey
* *
* @return string API key with the prefix * @return null|string API key with the prefix
*/ */
public function getApiKeyWithPrefix($apiKeyIdentifier) public function getApiKeyWithPrefix($apiKeyIdentifier)
{ {
@ -423,7 +426,7 @@ class Configuration
/** /**
* Returns an array of host settings * Returns an array of host settings
* *
* @return an array of host settings * @return array an array of host settings
*/ */
public function getHostSettings() public function getHostSettings()
{ {
@ -461,9 +464,9 @@ class Configuration
/** /**
* Returns URL based on the index and variables * Returns URL based on the index and variables
* *
* @param index array index of the host settings * @param int $index index of the host settings
* @param variables hash of variable and the corresponding value (optional) * @param array|null $variables hash of variable and the corresponding value (optional)
* @return URL based on host settings * @return string URL based on host settings
*/ */
public function getHostFromSettings($index, $variables = null) public function getHostFromSettings($index, $variables = null)
{ {

View File

@ -66,7 +66,7 @@ class HeaderSelector
* *
* @param string[] $accept Array of header * @param string[] $accept Array of header
* *
* @return string Accept (e.g. application/json) * @return null|string Accept (e.g. application/json)
*/ */
private function selectAcceptHeader($accept) private function selectAcceptHeader($accept)
{ {

View File

@ -51,20 +51,26 @@ class ObjectSerializer
* @param string $type the OpenAPIToolsType of the data * @param string $type the OpenAPIToolsType of the data
* @param string $format the format of the OpenAPITools type of the data * @param string $format the format of the OpenAPITools type of the data
* *
* @return string|object serialized form of $data * @return scalar|object|array|null serialized form of $data
*/ */
public static function sanitizeForSerialization($data, $type = null, $format = null) public static function sanitizeForSerialization($data, $type = null, $format = null)
{ {
if (is_scalar($data) || null === $data) { if (is_scalar($data) || null === $data) {
return $data; return $data;
} elseif ($data instanceof \DateTime) { }
if ($data instanceof \DateTime) {
return ($format === 'date') ? $data->format('Y-m-d') : $data->format(self::$dateTimeFormat); return ($format === 'date') ? $data->format('Y-m-d') : $data->format(self::$dateTimeFormat);
} elseif (is_array($data)) { }
if (is_array($data)) {
foreach ($data as $property => $value) { foreach ($data as $property => $value) {
$data[$property] = self::sanitizeForSerialization($value); $data[$property] = self::sanitizeForSerialization($value);
} }
return $data; return $data;
} elseif (is_object($data)) { }
if (is_object($data)) {
$values = []; $values = [];
if ($data instanceof ModelInterface) { if ($data instanceof ModelInterface) {
$formats = $data::openAPIFormats(); $formats = $data::openAPIFormats();
@ -250,7 +256,9 @@ class ObjectSerializer
{ {
if (null === $data) { if (null === $data) {
return null; return null;
} elseif (strcasecmp(substr($class, -2), '[]') === 0) { }
if (strcasecmp(substr($class, -2), '[]') === 0) {
$data = is_string($data) ? json_decode($data) : $data; $data = is_string($data) ? json_decode($data) : $data;
if (!is_array($data)) { if (!is_array($data)) {
@ -263,7 +271,9 @@ class ObjectSerializer
$values[] = self::deserialize($value, $subClass, null); $values[] = self::deserialize($value, $subClass, null);
} }
return $values; return $values;
} elseif (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int] }
if (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int]
$data = is_string($data) ? json_decode($data) : $data; $data = is_string($data) ? json_decode($data) : $data;
settype($data, 'array'); settype($data, 'array');
$inner = substr($class, 4, -1); $inner = substr($class, 4, -1);
@ -276,10 +286,14 @@ class ObjectSerializer
} }
} }
return $deserialized; return $deserialized;
} elseif ($class === 'object') { }
if ($class === 'object') {
settype($data, 'array'); settype($data, 'array');
return $data; return $data;
} elseif ($class === '\DateTime') { }
if ($class === '\DateTime') {
// Some API's return an invalid, empty string as a // Some API's return an invalid, empty string as a
// date-time property. DateTime::__construct() will return // date-time property. DateTime::__construct() will return
// the current time for empty input which is probably not // the current time for empty input which is probably not
@ -291,10 +305,14 @@ class ObjectSerializer
} else { } else {
return null; return null;
} }
} elseif (in_array($class, [{{&primitives}}], true)) { }
if (in_array($class, [{{&primitives}}], true)) {
settype($data, $class); settype($data, $class);
return $data; return $data;
} elseif ($class === '\SplFileObject') { }
if ($class === '\SplFileObject') {
/** @var \Psr\Http\Message\StreamInterface $data */ /** @var \Psr\Http\Message\StreamInterface $data */
// determine file name // determine file name

View File

@ -80,17 +80,17 @@ use {{invokerPackage}}\ObjectSerializer;
/** /**
* Set the host index * Set the host index
* *
* @param int Host index (required) * @param int $hostIndex Host index (required)
*/ */
public function setHostIndex($host_index) public function setHostIndex($hostIndex)
{ {
$this->hostIndex = $host_index; $this->hostIndex = $hostIndex;
} }
/** /**
* Get the host index * Get the host index
* *
* @return Host index * @return int Host index
*/ */
public function getHostIndex() public function getHostIndex()
{ {

View File

@ -16,7 +16,7 @@
* Please update the test case below to test the endpoint. * Please update the test case below to test the endpoint.
*/ */
namespace {{invokerPackage}}; namespace {{invokerPackage}}\Test\Api;
use \{{invokerPackage}}\Configuration; use \{{invokerPackage}}\Configuration;
use \{{invokerPackage}}\ApiException; use \{{invokerPackage}}\ApiException;
@ -71,6 +71,8 @@ use PHPUnit\Framework\TestCase;
*/ */
public function test{{vendorExtensions.x-test-operation-id}}() public function test{{vendorExtensions.x-test-operation-id}}()
{ {
// TODO: implement
$this->markTestIncomplete('Not implemented');
} }
{{/operation}} {{/operation}}
} }

View File

@ -36,6 +36,6 @@
"psr-4": { "{{escapedInvokerPackage}}\\" : "{{srcBasePath}}/" } "psr-4": { "{{escapedInvokerPackage}}\\" : "{{srcBasePath}}/" }
}, },
"autoload-dev": { "autoload-dev": {
"psr-4": { "{{escapedInvokerPackage}}\\" : "{{testBasePath}}/" } "psr-4": { "{{escapedInvokerPackage}}\\Test\\" : "{{testBasePath}}/" }
} }
} }

View File

@ -38,6 +38,11 @@ use \{{invokerPackage}}\ObjectSerializer;
* @package {{invokerPackage}} * @package {{invokerPackage}}
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
{{^isEnum}}
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
{{/isEnum}}
*/ */
{{#isEnum}}{{>model_enum}}{{/isEnum}}{{^isEnum}}{{>model_generic}}{{/isEnum}} {{#isEnum}}{{>model_enum}}{{/isEnum}}{{^isEnum}}{{>model_generic}}{{/isEnum}}
{{/model}}{{/models}} {{/model}}{{/models}}

View File

@ -1,6 +1,6 @@
class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^parentSchema}}implements ModelInterface, ArrayAccess{{/parentSchema}} class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^parentSchema}}implements ModelInterface, ArrayAccess{{/parentSchema}}
{ {
const DISCRIMINATOR = {{#discriminator}}'{{discriminatorName}}'{{/discriminator}}{{^discriminator}}null{{/discriminator}}; public const DISCRIMINATOR = {{#discriminator}}'{{discriminatorName}}'{{/discriminator}}{{^discriminator}}null{{/discriminator}};
/** /**
* The original name of the model. * The original name of the model.
@ -23,6 +23,8 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
{{#vars}}'{{name}}' => {{#dataFormat}}'{{{dataFormat}}}'{{/dataFormat}}{{^dataFormat}}null{{/dataFormat}}{{#hasMore}}, {{#vars}}'{{name}}' => {{#dataFormat}}'{{{dataFormat}}}'{{/dataFormat}}{{^dataFormat}}null{{/dataFormat}}{{#hasMore}},
@ -161,7 +163,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
{{/parentSchema}} {{/parentSchema}}
{{#vars}} {{#vars}}
$this->container['{{name}}'] = isset($data['{{name}}']) ? $data['{{name}}'] : {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}; $this->container['{{name}}'] = $data['{{name}}'] ?? {{#defaultValue}}{{{defaultValue}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}};
{{/vars}} {{/vars}}
{{#discriminator}} {{#discriminator}}
@ -278,7 +280,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
* *
* @param {{dataType}}{{^required}}|null{{/required}} ${{name}}{{#description}} {{{description}}}{{/description}}{{^description}} {{{name}}}{{/description}} * @param {{dataType}}{{^required}}|null{{/required}} ${{name}}{{#description}} {{{description}}}{{/description}}{{^description}} {{{name}}}{{/description}}
* *
* @return $this * @return self
*/ */
public function {{setter}}(${{name}}) public function {{setter}}(${{name}})
{ {
@ -362,17 +364,17 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -19,7 +19,7 @@
* Please update the test case below to test the model. * Please update the test case below to test the model.
*/ */
namespace {{invokerPackage}}; namespace {{invokerPackage}}\Test\Model;
use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestCase;
@ -68,6 +68,8 @@ class {{classname}}Test extends TestCase
*/ */
public function test{{classname}}() public function test{{classname}}()
{ {
// TODO: implement
$this->markTestIncomplete('Not implemented');
} }
{{#vars}} {{#vars}}
@ -76,6 +78,8 @@ class {{classname}}Test extends TestCase
*/ */
public function testProperty{{nameInCamelCase}}() public function testProperty{{nameInCamelCase}}()
{ {
// TODO: implement
$this->markTestIncomplete('Not implemented');
} }
{{/vars}} {{/vars}}
} }

View File

@ -33,6 +33,6 @@
"psr-4": { "OpenAPI\\Client\\" : "lib/" } "psr-4": { "OpenAPI\\Client\\" : "lib/" }
}, },
"autoload-dev": { "autoload-dev": {
"psr-4": { "OpenAPI\\Client\\" : "test/" } "psr-4": { "OpenAPI\\Client\\Test\\" : "test/" }
} }
} }

View File

@ -90,17 +90,17 @@ class AnotherFakeApi
/** /**
* Set the host index * Set the host index
* *
* @param int Host index (required) * @param int $hostIndex Host index (required)
*/ */
public function setHostIndex($host_index) public function setHostIndex($hostIndex)
{ {
$this->hostIndex = $host_index; $this->hostIndex = $hostIndex;
} }
/** /**
* Get the host index * Get the host index
* *
* @return Host index * @return int Host index
*/ */
public function getHostIndex() public function getHostIndex()
{ {

View File

@ -90,17 +90,17 @@ class DefaultApi
/** /**
* Set the host index * Set the host index
* *
* @param int Host index (required) * @param int $hostIndex Host index (required)
*/ */
public function setHostIndex($host_index) public function setHostIndex($hostIndex)
{ {
$this->hostIndex = $host_index; $this->hostIndex = $hostIndex;
} }
/** /**
* Get the host index * Get the host index
* *
* @return Host index * @return int Host index
*/ */
public function getHostIndex() public function getHostIndex()
{ {

View File

@ -90,17 +90,17 @@ class FakeApi
/** /**
* Set the host index * Set the host index
* *
* @param int Host index (required) * @param int $hostIndex Host index (required)
*/ */
public function setHostIndex($host_index) public function setHostIndex($hostIndex)
{ {
$this->hostIndex = $host_index; $this->hostIndex = $hostIndex;
} }
/** /**
* Get the host index * Get the host index
* *
* @return Host index * @return int Host index
*/ */
public function getHostIndex() public function getHostIndex()
{ {

View File

@ -90,17 +90,17 @@ class FakeClassnameTags123Api
/** /**
* Set the host index * Set the host index
* *
* @param int Host index (required) * @param int $hostIndex Host index (required)
*/ */
public function setHostIndex($host_index) public function setHostIndex($hostIndex)
{ {
$this->hostIndex = $host_index; $this->hostIndex = $hostIndex;
} }
/** /**
* Get the host index * Get the host index
* *
* @return Host index * @return int Host index
*/ */
public function getHostIndex() public function getHostIndex()
{ {

View File

@ -90,17 +90,17 @@ class PetApi
/** /**
* Set the host index * Set the host index
* *
* @param int Host index (required) * @param int $hostIndex Host index (required)
*/ */
public function setHostIndex($host_index) public function setHostIndex($hostIndex)
{ {
$this->hostIndex = $host_index; $this->hostIndex = $hostIndex;
} }
/** /**
* Get the host index * Get the host index
* *
* @return Host index * @return int Host index
*/ */
public function getHostIndex() public function getHostIndex()
{ {

View File

@ -90,17 +90,17 @@ class StoreApi
/** /**
* Set the host index * Set the host index
* *
* @param int Host index (required) * @param int $hostIndex Host index (required)
*/ */
public function setHostIndex($host_index) public function setHostIndex($hostIndex)
{ {
$this->hostIndex = $host_index; $this->hostIndex = $hostIndex;
} }
/** /**
* Get the host index * Get the host index
* *
* @return Host index * @return int Host index
*/ */
public function getHostIndex() public function getHostIndex()
{ {

View File

@ -90,17 +90,17 @@ class UserApi
/** /**
* Set the host index * Set the host index
* *
* @param int Host index (required) * @param int $hostIndex Host index (required)
*/ */
public function setHostIndex($host_index) public function setHostIndex($hostIndex)
{ {
$this->hostIndex = $host_index; $this->hostIndex = $hostIndex;
} }
/** /**
* Get the host index * Get the host index
* *
* @return Host index * @return int Host index
*/ */
public function getHostIndex() public function getHostIndex()
{ {

View File

@ -44,7 +44,7 @@ class ApiException extends Exception
/** /**
* The HTTP body of the server response either as Json or string. * The HTTP body of the server response either as Json or string.
* *
* @var mixed * @var \stdClass|string|null
*/ */
protected $responseBody; protected $responseBody;
@ -58,7 +58,7 @@ class ApiException extends Exception
/** /**
* The deserialized response object * The deserialized response object
* *
* @var $responseObject; * @var \stdClass|string|null
*/ */
protected $responseObject; protected $responseObject;
@ -68,7 +68,7 @@ class ApiException extends Exception
* @param string $message Error message * @param string $message Error message
* @param int $code HTTP status code * @param int $code HTTP status code
* @param string[]|null $responseHeaders HTTP response header * @param string[]|null $responseHeaders HTTP response header
* @param mixed $responseBody HTTP decoded body of the server response either as \stdClass or string * @param \stdClass|string|null $responseBody HTTP decoded body of the server response either as \stdClass or string
*/ */
public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null) public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null)
{ {
@ -90,7 +90,7 @@ class ApiException extends Exception
/** /**
* Gets the HTTP body of the server response either as Json or string * Gets the HTTP body of the server response either as Json or string
* *
* @return mixed HTTP body of the server response either as \stdClass or string * @return \stdClass|string|null HTTP body of the server response either as \stdClass or string
*/ */
public function getResponseBody() public function getResponseBody()
{ {

View File

@ -39,6 +39,9 @@ namespace OpenAPI\Client;
*/ */
class Configuration class Configuration
{ {
/**
* @var Configuration
*/
private static $defaultConfiguration; private static $defaultConfiguration;
/** /**
@ -138,7 +141,7 @@ class Configuration
* *
* @param string $apiKeyIdentifier API key identifier (authentication scheme) * @param string $apiKeyIdentifier API key identifier (authentication scheme)
* *
* @return string API key or token * @return null|string API key or token
*/ */
public function getApiKey($apiKeyIdentifier) public function getApiKey($apiKeyIdentifier)
{ {
@ -164,7 +167,7 @@ class Configuration
* *
* @param string $apiKeyIdentifier API key identifier (authentication scheme) * @param string $apiKeyIdentifier API key identifier (authentication scheme)
* *
* @return string * @return null|string
*/ */
public function getApiKeyPrefix($apiKeyIdentifier) public function getApiKeyPrefix($apiKeyIdentifier)
{ {
@ -407,7 +410,7 @@ class Configuration
* *
* @param string $apiKeyIdentifier name of apikey * @param string $apiKeyIdentifier name of apikey
* *
* @return string API key with the prefix * @return null|string API key with the prefix
*/ */
public function getApiKeyWithPrefix($apiKeyIdentifier) public function getApiKeyWithPrefix($apiKeyIdentifier)
{ {
@ -430,7 +433,7 @@ class Configuration
/** /**
* Returns an array of host settings * Returns an array of host settings
* *
* @return an array of host settings * @return array an array of host settings
*/ */
public function getHostSettings() public function getHostSettings()
{ {
@ -478,9 +481,9 @@ class Configuration
/** /**
* Returns URL based on the index and variables * Returns URL based on the index and variables
* *
* @param index array index of the host settings * @param int $index index of the host settings
* @param variables hash of variable and the corresponding value (optional) * @param array|null $variables hash of variable and the corresponding value (optional)
* @return URL based on host settings * @return string URL based on host settings
*/ */
public function getHostFromSettings($index, $variables = null) public function getHostFromSettings($index, $variables = null)
{ {

View File

@ -76,7 +76,7 @@ class HeaderSelector
* *
* @param string[] $accept Array of header * @param string[] $accept Array of header
* *
* @return string Accept (e.g. application/json) * @return null|string Accept (e.g. application/json)
*/ */
private function selectAcceptHeader($accept) private function selectAcceptHeader($accept)
{ {

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class AdditionalPropertiesClass implements ModelInterface, ArrayAccess class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'map_property' => null, 'map_property' => null,
@ -182,8 +187,8 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['map_property'] = isset($data['map_property']) ? $data['map_property'] : null; $this->container['map_property'] = $data['map_property'] ?? null;
$this->container['map_of_map_property'] = isset($data['map_of_map_property']) ? $data['map_of_map_property'] : null; $this->container['map_of_map_property'] = $data['map_of_map_property'] ?? null;
} }
/** /**
@ -225,7 +230,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
* *
* @param map[string,string]|null $map_property map_property * @param map[string,string]|null $map_property map_property
* *
* @return $this * @return self
*/ */
public function setMapProperty($map_property) public function setMapProperty($map_property)
{ {
@ -249,7 +254,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
* *
* @param map[string,map[string,string]]|null $map_of_map_property map_of_map_property * @param map[string,map[string,string]]|null $map_of_map_property map_of_map_property
* *
* @return $this * @return self
*/ */
public function setMapOfMapProperty($map_of_map_property) public function setMapOfMapProperty($map_of_map_property)
{ {
@ -274,17 +279,17 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class Animal implements ModelInterface, ArrayAccess class Animal implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = 'class_name'; public const DISCRIMINATOR = 'class_name';
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class Animal implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'class_name' => null, 'class_name' => null,
@ -182,8 +187,8 @@ class Animal implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['class_name'] = isset($data['class_name']) ? $data['class_name'] : null; $this->container['class_name'] = $data['class_name'] ?? null;
$this->container['color'] = isset($data['color']) ? $data['color'] : 'red'; $this->container['color'] = $data['color'] ?? 'red';
// Initialize discriminator property with the model name. // Initialize discriminator property with the model name.
$this->container['class_name'] = static::$openAPIModelName; $this->container['class_name'] = static::$openAPIModelName;
@ -231,7 +236,7 @@ class Animal implements ModelInterface, ArrayAccess
* *
* @param string $class_name class_name * @param string $class_name class_name
* *
* @return $this * @return self
*/ */
public function setClassName($class_name) public function setClassName($class_name)
{ {
@ -255,7 +260,7 @@ class Animal implements ModelInterface, ArrayAccess
* *
* @param string|null $color color * @param string|null $color color
* *
* @return $this * @return self
*/ */
public function setColor($color) public function setColor($color)
{ {
@ -280,17 +285,17 @@ class Animal implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class ApiResponse implements ModelInterface, ArrayAccess class ApiResponse implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -66,6 +69,8 @@ class ApiResponse implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'code' => 'int32', 'code' => 'int32',
@ -187,9 +192,9 @@ class ApiResponse implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['code'] = isset($data['code']) ? $data['code'] : null; $this->container['code'] = $data['code'] ?? null;
$this->container['type'] = isset($data['type']) ? $data['type'] : null; $this->container['type'] = $data['type'] ?? null;
$this->container['message'] = isset($data['message']) ? $data['message'] : null; $this->container['message'] = $data['message'] ?? null;
} }
/** /**
@ -231,7 +236,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
* *
* @param int|null $code code * @param int|null $code code
* *
* @return $this * @return self
*/ */
public function setCode($code) public function setCode($code)
{ {
@ -255,7 +260,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
* *
* @param string|null $type type * @param string|null $type type
* *
* @return $this * @return self
*/ */
public function setType($type) public function setType($type)
{ {
@ -279,7 +284,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
* *
* @param string|null $message message * @param string|null $message message
* *
* @return $this * @return self
*/ */
public function setMessage($message) public function setMessage($message)
{ {
@ -304,17 +309,17 @@ class ApiResponse implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -64,6 +67,8 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'array_array_number' => null 'array_array_number' => null
@ -177,7 +182,7 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['array_array_number'] = isset($data['array_array_number']) ? $data['array_array_number'] : null; $this->container['array_array_number'] = $data['array_array_number'] ?? null;
} }
/** /**
@ -219,7 +224,7 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
* *
* @param float[][]|null $array_array_number array_array_number * @param float[][]|null $array_array_number array_array_number
* *
* @return $this * @return self
*/ */
public function setArrayArrayNumber($array_array_number) public function setArrayArrayNumber($array_array_number)
{ {
@ -244,17 +249,17 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class ArrayOfNumberOnly implements ModelInterface, ArrayAccess class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -64,6 +67,8 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'array_number' => null 'array_number' => null
@ -177,7 +182,7 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['array_number'] = isset($data['array_number']) ? $data['array_number'] : null; $this->container['array_number'] = $data['array_number'] ?? null;
} }
/** /**
@ -219,7 +224,7 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
* *
* @param float[]|null $array_number array_number * @param float[]|null $array_number array_number
* *
* @return $this * @return self
*/ */
public function setArrayNumber($array_number) public function setArrayNumber($array_number)
{ {
@ -244,17 +249,17 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class ArrayTest implements ModelInterface, ArrayAccess class ArrayTest implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -66,6 +69,8 @@ class ArrayTest implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'array_of_string' => null, 'array_of_string' => null,
@ -187,9 +192,9 @@ class ArrayTest implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['array_of_string'] = isset($data['array_of_string']) ? $data['array_of_string'] : null; $this->container['array_of_string'] = $data['array_of_string'] ?? null;
$this->container['array_array_of_integer'] = isset($data['array_array_of_integer']) ? $data['array_array_of_integer'] : null; $this->container['array_array_of_integer'] = $data['array_array_of_integer'] ?? null;
$this->container['array_array_of_model'] = isset($data['array_array_of_model']) ? $data['array_array_of_model'] : null; $this->container['array_array_of_model'] = $data['array_array_of_model'] ?? null;
} }
/** /**
@ -231,7 +236,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
* *
* @param string[]|null $array_of_string array_of_string * @param string[]|null $array_of_string array_of_string
* *
* @return $this * @return self
*/ */
public function setArrayOfString($array_of_string) public function setArrayOfString($array_of_string)
{ {
@ -255,7 +260,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
* *
* @param int[][]|null $array_array_of_integer array_array_of_integer * @param int[][]|null $array_array_of_integer array_array_of_integer
* *
* @return $this * @return self
*/ */
public function setArrayArrayOfInteger($array_array_of_integer) public function setArrayArrayOfInteger($array_array_of_integer)
{ {
@ -279,7 +284,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
* *
* @param \OpenAPI\Client\Model\ReadOnlyFirst[][]|null $array_array_of_model array_array_of_model * @param \OpenAPI\Client\Model\ReadOnlyFirst[][]|null $array_array_of_model array_array_of_model
* *
* @return $this * @return self
*/ */
public function setArrayArrayOfModel($array_array_of_model) public function setArrayArrayOfModel($array_array_of_model)
{ {
@ -304,17 +309,17 @@ class ArrayTest implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class Capitalization implements ModelInterface, ArrayAccess class Capitalization implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -69,6 +72,8 @@ class Capitalization implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'small_camel' => null, 'small_camel' => null,
@ -202,12 +207,12 @@ class Capitalization implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['small_camel'] = isset($data['small_camel']) ? $data['small_camel'] : null; $this->container['small_camel'] = $data['small_camel'] ?? null;
$this->container['capital_camel'] = isset($data['capital_camel']) ? $data['capital_camel'] : null; $this->container['capital_camel'] = $data['capital_camel'] ?? null;
$this->container['small_snake'] = isset($data['small_snake']) ? $data['small_snake'] : null; $this->container['small_snake'] = $data['small_snake'] ?? null;
$this->container['capital_snake'] = isset($data['capital_snake']) ? $data['capital_snake'] : null; $this->container['capital_snake'] = $data['capital_snake'] ?? null;
$this->container['sca_eth_flow_points'] = isset($data['sca_eth_flow_points']) ? $data['sca_eth_flow_points'] : null; $this->container['sca_eth_flow_points'] = $data['sca_eth_flow_points'] ?? null;
$this->container['att_name'] = isset($data['att_name']) ? $data['att_name'] : null; $this->container['att_name'] = $data['att_name'] ?? null;
} }
/** /**
@ -249,7 +254,7 @@ class Capitalization implements ModelInterface, ArrayAccess
* *
* @param string|null $small_camel small_camel * @param string|null $small_camel small_camel
* *
* @return $this * @return self
*/ */
public function setSmallCamel($small_camel) public function setSmallCamel($small_camel)
{ {
@ -273,7 +278,7 @@ class Capitalization implements ModelInterface, ArrayAccess
* *
* @param string|null $capital_camel capital_camel * @param string|null $capital_camel capital_camel
* *
* @return $this * @return self
*/ */
public function setCapitalCamel($capital_camel) public function setCapitalCamel($capital_camel)
{ {
@ -297,7 +302,7 @@ class Capitalization implements ModelInterface, ArrayAccess
* *
* @param string|null $small_snake small_snake * @param string|null $small_snake small_snake
* *
* @return $this * @return self
*/ */
public function setSmallSnake($small_snake) public function setSmallSnake($small_snake)
{ {
@ -321,7 +326,7 @@ class Capitalization implements ModelInterface, ArrayAccess
* *
* @param string|null $capital_snake capital_snake * @param string|null $capital_snake capital_snake
* *
* @return $this * @return self
*/ */
public function setCapitalSnake($capital_snake) public function setCapitalSnake($capital_snake)
{ {
@ -345,7 +350,7 @@ class Capitalization implements ModelInterface, ArrayAccess
* *
* @param string|null $sca_eth_flow_points sca_eth_flow_points * @param string|null $sca_eth_flow_points sca_eth_flow_points
* *
* @return $this * @return self
*/ */
public function setScaEthFlowPoints($sca_eth_flow_points) public function setScaEthFlowPoints($sca_eth_flow_points)
{ {
@ -369,7 +374,7 @@ class Capitalization implements ModelInterface, ArrayAccess
* *
* @param string|null $att_name Name of the pet * @param string|null $att_name Name of the pet
* *
* @return $this * @return self
*/ */
public function setAttName($att_name) public function setAttName($att_name)
{ {
@ -394,17 +399,17 @@ class Capitalization implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -37,10 +37,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class Cat extends Animal class Cat extends Animal
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -62,6 +65,8 @@ class Cat extends Animal
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'declawed' => null 'declawed' => null
@ -171,7 +176,7 @@ class Cat extends Animal
{ {
parent::__construct($data); parent::__construct($data);
$this->container['declawed'] = isset($data['declawed']) ? $data['declawed'] : null; $this->container['declawed'] = $data['declawed'] ?? null;
} }
/** /**
@ -213,7 +218,7 @@ class Cat extends Animal
* *
* @param bool|null $declawed declawed * @param bool|null $declawed declawed
* *
* @return $this * @return self
*/ */
public function setDeclawed($declawed) public function setDeclawed($declawed)
{ {
@ -238,17 +243,17 @@ class Cat extends Animal
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class CatAllOf implements ModelInterface, ArrayAccess class CatAllOf implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -64,6 +67,8 @@ class CatAllOf implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'declawed' => null 'declawed' => null
@ -177,7 +182,7 @@ class CatAllOf implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['declawed'] = isset($data['declawed']) ? $data['declawed'] : null; $this->container['declawed'] = $data['declawed'] ?? null;
} }
/** /**
@ -219,7 +224,7 @@ class CatAllOf implements ModelInterface, ArrayAccess
* *
* @param bool|null $declawed declawed * @param bool|null $declawed declawed
* *
* @return $this * @return self
*/ */
public function setDeclawed($declawed) public function setDeclawed($declawed)
{ {
@ -244,17 +249,17 @@ class CatAllOf implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class Category implements ModelInterface, ArrayAccess class Category implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class Category implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'id' => 'int64', 'id' => 'int64',
@ -182,8 +187,8 @@ class Category implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['id'] = $data['id'] ?? null;
$this->container['name'] = isset($data['name']) ? $data['name'] : 'default-name'; $this->container['name'] = $data['name'] ?? 'default-name';
} }
/** /**
@ -228,7 +233,7 @@ class Category implements ModelInterface, ArrayAccess
* *
* @param int|null $id id * @param int|null $id id
* *
* @return $this * @return self
*/ */
public function setId($id) public function setId($id)
{ {
@ -252,7 +257,7 @@ class Category implements ModelInterface, ArrayAccess
* *
* @param string $name name * @param string $name name
* *
* @return $this * @return self
*/ */
public function setName($name) public function setName($name)
{ {
@ -277,17 +282,17 @@ class Category implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -40,10 +40,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class ClassModel implements ModelInterface, ArrayAccess class ClassModel implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class ClassModel implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'_class' => null '_class' => null
@ -178,7 +183,7 @@ class ClassModel implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['_class'] = isset($data['_class']) ? $data['_class'] : null; $this->container['_class'] = $data['_class'] ?? null;
} }
/** /**
@ -220,7 +225,7 @@ class ClassModel implements ModelInterface, ArrayAccess
* *
* @param string|null $_class _class * @param string|null $_class _class
* *
* @return $this * @return self
*/ */
public function setClass($_class) public function setClass($_class)
{ {
@ -245,17 +250,17 @@ class ClassModel implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class Client implements ModelInterface, ArrayAccess class Client implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -64,6 +67,8 @@ class Client implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'client' => null 'client' => null
@ -177,7 +182,7 @@ class Client implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['client'] = isset($data['client']) ? $data['client'] : null; $this->container['client'] = $data['client'] ?? null;
} }
/** /**
@ -219,7 +224,7 @@ class Client implements ModelInterface, ArrayAccess
* *
* @param string|null $client client * @param string|null $client client
* *
* @return $this * @return self
*/ */
public function setClient($client) public function setClient($client)
{ {
@ -244,17 +249,17 @@ class Client implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -37,10 +37,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class Dog extends Animal class Dog extends Animal
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -62,6 +65,8 @@ class Dog extends Animal
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'breed' => null 'breed' => null
@ -171,7 +176,7 @@ class Dog extends Animal
{ {
parent::__construct($data); parent::__construct($data);
$this->container['breed'] = isset($data['breed']) ? $data['breed'] : null; $this->container['breed'] = $data['breed'] ?? null;
} }
/** /**
@ -213,7 +218,7 @@ class Dog extends Animal
* *
* @param string|null $breed breed * @param string|null $breed breed
* *
* @return $this * @return self
*/ */
public function setBreed($breed) public function setBreed($breed)
{ {
@ -238,17 +243,17 @@ class Dog extends Animal
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class DogAllOf implements ModelInterface, ArrayAccess class DogAllOf implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -64,6 +67,8 @@ class DogAllOf implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'breed' => null 'breed' => null
@ -177,7 +182,7 @@ class DogAllOf implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['breed'] = isset($data['breed']) ? $data['breed'] : null; $this->container['breed'] = $data['breed'] ?? null;
} }
/** /**
@ -219,7 +224,7 @@ class DogAllOf implements ModelInterface, ArrayAccess
* *
* @param string|null $breed breed * @param string|null $breed breed
* *
* @return $this * @return self
*/ */
public function setBreed($breed) public function setBreed($breed)
{ {
@ -244,17 +249,17 @@ class DogAllOf implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class EnumArrays implements ModelInterface, ArrayAccess class EnumArrays implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class EnumArrays implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'just_symbol' => null, 'just_symbol' => null,
@ -212,8 +217,8 @@ class EnumArrays implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['just_symbol'] = isset($data['just_symbol']) ? $data['just_symbol'] : null; $this->container['just_symbol'] = $data['just_symbol'] ?? null;
$this->container['array_enum'] = isset($data['array_enum']) ? $data['array_enum'] : null; $this->container['array_enum'] = $data['array_enum'] ?? null;
} }
/** /**
@ -263,7 +268,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
* *
* @param string|null $just_symbol just_symbol * @param string|null $just_symbol just_symbol
* *
* @return $this * @return self
*/ */
public function setJustSymbol($just_symbol) public function setJustSymbol($just_symbol)
{ {
@ -296,7 +301,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
* *
* @param string[]|null $array_enum array_enum * @param string[]|null $array_enum array_enum
* *
* @return $this * @return self
*/ */
public function setArrayEnum($array_enum) public function setArrayEnum($array_enum)
{ {
@ -330,17 +335,17 @@ class EnumArrays implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class EnumTest implements ModelInterface, ArrayAccess class EnumTest implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -71,6 +74,8 @@ class EnumTest implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'enum_string' => null, 'enum_string' => null,
@ -276,14 +281,14 @@ class EnumTest implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['enum_string'] = isset($data['enum_string']) ? $data['enum_string'] : null; $this->container['enum_string'] = $data['enum_string'] ?? null;
$this->container['enum_string_required'] = isset($data['enum_string_required']) ? $data['enum_string_required'] : null; $this->container['enum_string_required'] = $data['enum_string_required'] ?? null;
$this->container['enum_integer'] = isset($data['enum_integer']) ? $data['enum_integer'] : null; $this->container['enum_integer'] = $data['enum_integer'] ?? null;
$this->container['enum_number'] = isset($data['enum_number']) ? $data['enum_number'] : null; $this->container['enum_number'] = $data['enum_number'] ?? null;
$this->container['outer_enum'] = isset($data['outer_enum']) ? $data['outer_enum'] : null; $this->container['outer_enum'] = $data['outer_enum'] ?? null;
$this->container['outer_enum_integer'] = isset($data['outer_enum_integer']) ? $data['outer_enum_integer'] : null; $this->container['outer_enum_integer'] = $data['outer_enum_integer'] ?? null;
$this->container['outer_enum_default_value'] = isset($data['outer_enum_default_value']) ? $data['outer_enum_default_value'] : null; $this->container['outer_enum_default_value'] = $data['outer_enum_default_value'] ?? null;
$this->container['outer_enum_integer_default_value'] = isset($data['outer_enum_integer_default_value']) ? $data['outer_enum_integer_default_value'] : null; $this->container['outer_enum_integer_default_value'] = $data['outer_enum_integer_default_value'] ?? null;
} }
/** /**
@ -360,7 +365,7 @@ class EnumTest implements ModelInterface, ArrayAccess
* *
* @param string|null $enum_string enum_string * @param string|null $enum_string enum_string
* *
* @return $this * @return self
*/ */
public function setEnumString($enum_string) public function setEnumString($enum_string)
{ {
@ -393,7 +398,7 @@ class EnumTest implements ModelInterface, ArrayAccess
* *
* @param string $enum_string_required enum_string_required * @param string $enum_string_required enum_string_required
* *
* @return $this * @return self
*/ */
public function setEnumStringRequired($enum_string_required) public function setEnumStringRequired($enum_string_required)
{ {
@ -426,7 +431,7 @@ class EnumTest implements ModelInterface, ArrayAccess
* *
* @param int|null $enum_integer enum_integer * @param int|null $enum_integer enum_integer
* *
* @return $this * @return self
*/ */
public function setEnumInteger($enum_integer) public function setEnumInteger($enum_integer)
{ {
@ -459,7 +464,7 @@ class EnumTest implements ModelInterface, ArrayAccess
* *
* @param double|null $enum_number enum_number * @param double|null $enum_number enum_number
* *
* @return $this * @return self
*/ */
public function setEnumNumber($enum_number) public function setEnumNumber($enum_number)
{ {
@ -492,7 +497,7 @@ class EnumTest implements ModelInterface, ArrayAccess
* *
* @param \OpenAPI\Client\Model\OuterEnum|null $outer_enum outer_enum * @param \OpenAPI\Client\Model\OuterEnum|null $outer_enum outer_enum
* *
* @return $this * @return self
*/ */
public function setOuterEnum($outer_enum) public function setOuterEnum($outer_enum)
{ {
@ -516,7 +521,7 @@ class EnumTest implements ModelInterface, ArrayAccess
* *
* @param \OpenAPI\Client\Model\OuterEnumInteger|null $outer_enum_integer outer_enum_integer * @param \OpenAPI\Client\Model\OuterEnumInteger|null $outer_enum_integer outer_enum_integer
* *
* @return $this * @return self
*/ */
public function setOuterEnumInteger($outer_enum_integer) public function setOuterEnumInteger($outer_enum_integer)
{ {
@ -540,7 +545,7 @@ class EnumTest implements ModelInterface, ArrayAccess
* *
* @param \OpenAPI\Client\Model\OuterEnumDefaultValue|null $outer_enum_default_value outer_enum_default_value * @param \OpenAPI\Client\Model\OuterEnumDefaultValue|null $outer_enum_default_value outer_enum_default_value
* *
* @return $this * @return self
*/ */
public function setOuterEnumDefaultValue($outer_enum_default_value) public function setOuterEnumDefaultValue($outer_enum_default_value)
{ {
@ -564,7 +569,7 @@ class EnumTest implements ModelInterface, ArrayAccess
* *
* @param \OpenAPI\Client\Model\OuterEnumIntegerDefaultValue|null $outer_enum_integer_default_value outer_enum_integer_default_value * @param \OpenAPI\Client\Model\OuterEnumIntegerDefaultValue|null $outer_enum_integer_default_value outer_enum_integer_default_value
* *
* @return $this * @return self
*/ */
public function setOuterEnumIntegerDefaultValue($outer_enum_integer_default_value) public function setOuterEnumIntegerDefaultValue($outer_enum_integer_default_value)
{ {
@ -589,17 +594,17 @@ class EnumTest implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -40,10 +40,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class File implements ModelInterface, ArrayAccess class File implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class File implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'source_uri' => null 'source_uri' => null
@ -178,7 +183,7 @@ class File implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['source_uri'] = isset($data['source_uri']) ? $data['source_uri'] : null; $this->container['source_uri'] = $data['source_uri'] ?? null;
} }
/** /**
@ -220,7 +225,7 @@ class File implements ModelInterface, ArrayAccess
* *
* @param string|null $source_uri Test capitalization * @param string|null $source_uri Test capitalization
* *
* @return $this * @return self
*/ */
public function setSourceUri($source_uri) public function setSourceUri($source_uri)
{ {
@ -245,17 +250,17 @@ class File implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class FileSchemaTestClass implements ModelInterface, ArrayAccess class FileSchemaTestClass implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class FileSchemaTestClass implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'file' => null, 'file' => null,
@ -182,8 +187,8 @@ class FileSchemaTestClass implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['file'] = isset($data['file']) ? $data['file'] : null; $this->container['file'] = $data['file'] ?? null;
$this->container['files'] = isset($data['files']) ? $data['files'] : null; $this->container['files'] = $data['files'] ?? null;
} }
/** /**
@ -225,7 +230,7 @@ class FileSchemaTestClass implements ModelInterface, ArrayAccess
* *
* @param \OpenAPI\Client\Model\File|null $file file * @param \OpenAPI\Client\Model\File|null $file file
* *
* @return $this * @return self
*/ */
public function setFile($file) public function setFile($file)
{ {
@ -249,7 +254,7 @@ class FileSchemaTestClass implements ModelInterface, ArrayAccess
* *
* @param \OpenAPI\Client\Model\File[]|null $files files * @param \OpenAPI\Client\Model\File[]|null $files files
* *
* @return $this * @return self
*/ */
public function setFiles($files) public function setFiles($files)
{ {
@ -274,17 +279,17 @@ class FileSchemaTestClass implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class Foo implements ModelInterface, ArrayAccess class Foo implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -64,6 +67,8 @@ class Foo implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'bar' => null 'bar' => null
@ -177,7 +182,7 @@ class Foo implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['bar'] = isset($data['bar']) ? $data['bar'] : 'bar'; $this->container['bar'] = $data['bar'] ?? 'bar';
} }
/** /**
@ -219,7 +224,7 @@ class Foo implements ModelInterface, ArrayAccess
* *
* @param string|null $bar bar * @param string|null $bar bar
* *
* @return $this * @return self
*/ */
public function setBar($bar) public function setBar($bar)
{ {
@ -244,17 +249,17 @@ class Foo implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class FormatTest implements ModelInterface, ArrayAccess class FormatTest implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -78,6 +81,8 @@ class FormatTest implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'integer' => null, 'integer' => null,
@ -247,21 +252,21 @@ class FormatTest implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['integer'] = isset($data['integer']) ? $data['integer'] : null; $this->container['integer'] = $data['integer'] ?? null;
$this->container['int32'] = isset($data['int32']) ? $data['int32'] : null; $this->container['int32'] = $data['int32'] ?? null;
$this->container['int64'] = isset($data['int64']) ? $data['int64'] : null; $this->container['int64'] = $data['int64'] ?? null;
$this->container['number'] = isset($data['number']) ? $data['number'] : null; $this->container['number'] = $data['number'] ?? null;
$this->container['float'] = isset($data['float']) ? $data['float'] : null; $this->container['float'] = $data['float'] ?? null;
$this->container['double'] = isset($data['double']) ? $data['double'] : null; $this->container['double'] = $data['double'] ?? null;
$this->container['string'] = isset($data['string']) ? $data['string'] : null; $this->container['string'] = $data['string'] ?? null;
$this->container['byte'] = isset($data['byte']) ? $data['byte'] : null; $this->container['byte'] = $data['byte'] ?? null;
$this->container['binary'] = isset($data['binary']) ? $data['binary'] : null; $this->container['binary'] = $data['binary'] ?? null;
$this->container['date'] = isset($data['date']) ? $data['date'] : null; $this->container['date'] = $data['date'] ?? null;
$this->container['date_time'] = isset($data['date_time']) ? $data['date_time'] : null; $this->container['date_time'] = $data['date_time'] ?? null;
$this->container['uuid'] = isset($data['uuid']) ? $data['uuid'] : null; $this->container['uuid'] = $data['uuid'] ?? null;
$this->container['password'] = isset($data['password']) ? $data['password'] : null; $this->container['password'] = $data['password'] ?? null;
$this->container['pattern_with_digits'] = isset($data['pattern_with_digits']) ? $data['pattern_with_digits'] : null; $this->container['pattern_with_digits'] = $data['pattern_with_digits'] ?? null;
$this->container['pattern_with_digits_and_delimiter'] = isset($data['pattern_with_digits_and_delimiter']) ? $data['pattern_with_digits_and_delimiter'] : null; $this->container['pattern_with_digits_and_delimiter'] = $data['pattern_with_digits_and_delimiter'] ?? null;
} }
/** /**
@ -375,7 +380,7 @@ class FormatTest implements ModelInterface, ArrayAccess
* *
* @param int|null $integer integer * @param int|null $integer integer
* *
* @return $this * @return self
*/ */
public function setInteger($integer) public function setInteger($integer)
{ {
@ -407,7 +412,7 @@ class FormatTest implements ModelInterface, ArrayAccess
* *
* @param int|null $int32 int32 * @param int|null $int32 int32
* *
* @return $this * @return self
*/ */
public function setInt32($int32) public function setInt32($int32)
{ {
@ -439,7 +444,7 @@ class FormatTest implements ModelInterface, ArrayAccess
* *
* @param int|null $int64 int64 * @param int|null $int64 int64
* *
* @return $this * @return self
*/ */
public function setInt64($int64) public function setInt64($int64)
{ {
@ -463,7 +468,7 @@ class FormatTest implements ModelInterface, ArrayAccess
* *
* @param float $number number * @param float $number number
* *
* @return $this * @return self
*/ */
public function setNumber($number) public function setNumber($number)
{ {
@ -495,7 +500,7 @@ class FormatTest implements ModelInterface, ArrayAccess
* *
* @param float|null $float float * @param float|null $float float
* *
* @return $this * @return self
*/ */
public function setFloat($float) public function setFloat($float)
{ {
@ -527,7 +532,7 @@ class FormatTest implements ModelInterface, ArrayAccess
* *
* @param double|null $double double * @param double|null $double double
* *
* @return $this * @return self
*/ */
public function setDouble($double) public function setDouble($double)
{ {
@ -559,7 +564,7 @@ class FormatTest implements ModelInterface, ArrayAccess
* *
* @param string|null $string string * @param string|null $string string
* *
* @return $this * @return self
*/ */
public function setString($string) public function setString($string)
{ {
@ -588,7 +593,7 @@ class FormatTest implements ModelInterface, ArrayAccess
* *
* @param string $byte byte * @param string $byte byte
* *
* @return $this * @return self
*/ */
public function setByte($byte) public function setByte($byte)
{ {
@ -612,7 +617,7 @@ class FormatTest implements ModelInterface, ArrayAccess
* *
* @param \SplFileObject|null $binary binary * @param \SplFileObject|null $binary binary
* *
* @return $this * @return self
*/ */
public function setBinary($binary) public function setBinary($binary)
{ {
@ -636,7 +641,7 @@ class FormatTest implements ModelInterface, ArrayAccess
* *
* @param \DateTime $date date * @param \DateTime $date date
* *
* @return $this * @return self
*/ */
public function setDate($date) public function setDate($date)
{ {
@ -660,7 +665,7 @@ class FormatTest implements ModelInterface, ArrayAccess
* *
* @param \DateTime|null $date_time date_time * @param \DateTime|null $date_time date_time
* *
* @return $this * @return self
*/ */
public function setDateTime($date_time) public function setDateTime($date_time)
{ {
@ -684,7 +689,7 @@ class FormatTest implements ModelInterface, ArrayAccess
* *
* @param string|null $uuid uuid * @param string|null $uuid uuid
* *
* @return $this * @return self
*/ */
public function setUuid($uuid) public function setUuid($uuid)
{ {
@ -708,7 +713,7 @@ class FormatTest implements ModelInterface, ArrayAccess
* *
* @param string $password password * @param string $password password
* *
* @return $this * @return self
*/ */
public function setPassword($password) public function setPassword($password)
{ {
@ -739,7 +744,7 @@ class FormatTest implements ModelInterface, ArrayAccess
* *
* @param string|null $pattern_with_digits A string that is a 10 digit number. Can have leading zeros. * @param string|null $pattern_with_digits A string that is a 10 digit number. Can have leading zeros.
* *
* @return $this * @return self
*/ */
public function setPatternWithDigits($pattern_with_digits) public function setPatternWithDigits($pattern_with_digits)
{ {
@ -768,7 +773,7 @@ class FormatTest implements ModelInterface, ArrayAccess
* *
* @param string|null $pattern_with_digits_and_delimiter A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. * @param string|null $pattern_with_digits_and_delimiter A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.
* *
* @return $this * @return self
*/ */
public function setPatternWithDigitsAndDelimiter($pattern_with_digits_and_delimiter) public function setPatternWithDigitsAndDelimiter($pattern_with_digits_and_delimiter)
{ {
@ -798,17 +803,17 @@ class FormatTest implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class HasOnlyReadOnly implements ModelInterface, ArrayAccess class HasOnlyReadOnly implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'bar' => null, 'bar' => null,
@ -182,8 +187,8 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['bar'] = isset($data['bar']) ? $data['bar'] : null; $this->container['bar'] = $data['bar'] ?? null;
$this->container['foo'] = isset($data['foo']) ? $data['foo'] : null; $this->container['foo'] = $data['foo'] ?? null;
} }
/** /**
@ -225,7 +230,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
* *
* @param string|null $bar bar * @param string|null $bar bar
* *
* @return $this * @return self
*/ */
public function setBar($bar) public function setBar($bar)
{ {
@ -249,7 +254,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
* *
* @param string|null $foo foo * @param string|null $foo foo
* *
* @return $this * @return self
*/ */
public function setFoo($foo) public function setFoo($foo)
{ {
@ -274,17 +279,17 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -40,10 +40,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class HealthCheckResult implements ModelInterface, ArrayAccess class HealthCheckResult implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class HealthCheckResult implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'nullable_message' => null 'nullable_message' => null
@ -178,7 +183,7 @@ class HealthCheckResult implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['nullable_message'] = isset($data['nullable_message']) ? $data['nullable_message'] : null; $this->container['nullable_message'] = $data['nullable_message'] ?? null;
} }
/** /**
@ -220,7 +225,7 @@ class HealthCheckResult implements ModelInterface, ArrayAccess
* *
* @param string|null $nullable_message nullable_message * @param string|null $nullable_message nullable_message
* *
* @return $this * @return self
*/ */
public function setNullableMessage($nullable_message) public function setNullableMessage($nullable_message)
{ {
@ -245,17 +250,17 @@ class HealthCheckResult implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class InlineObject implements ModelInterface, ArrayAccess class InlineObject implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class InlineObject implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'name' => null, 'name' => null,
@ -182,8 +187,8 @@ class InlineObject implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['name'] = $data['name'] ?? null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null; $this->container['status'] = $data['status'] ?? null;
} }
/** /**
@ -225,7 +230,7 @@ class InlineObject implements ModelInterface, ArrayAccess
* *
* @param string|null $name Updated name of the pet * @param string|null $name Updated name of the pet
* *
* @return $this * @return self
*/ */
public function setName($name) public function setName($name)
{ {
@ -249,7 +254,7 @@ class InlineObject implements ModelInterface, ArrayAccess
* *
* @param string|null $status Updated status of the pet * @param string|null $status Updated status of the pet
* *
* @return $this * @return self
*/ */
public function setStatus($status) public function setStatus($status)
{ {
@ -274,17 +279,17 @@ class InlineObject implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class InlineObject1 implements ModelInterface, ArrayAccess class InlineObject1 implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class InlineObject1 implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'additional_metadata' => null, 'additional_metadata' => null,
@ -182,8 +187,8 @@ class InlineObject1 implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['additional_metadata'] = isset($data['additional_metadata']) ? $data['additional_metadata'] : null; $this->container['additional_metadata'] = $data['additional_metadata'] ?? null;
$this->container['file'] = isset($data['file']) ? $data['file'] : null; $this->container['file'] = $data['file'] ?? null;
} }
/** /**
@ -225,7 +230,7 @@ class InlineObject1 implements ModelInterface, ArrayAccess
* *
* @param string|null $additional_metadata Additional data to pass to server * @param string|null $additional_metadata Additional data to pass to server
* *
* @return $this * @return self
*/ */
public function setAdditionalMetadata($additional_metadata) public function setAdditionalMetadata($additional_metadata)
{ {
@ -249,7 +254,7 @@ class InlineObject1 implements ModelInterface, ArrayAccess
* *
* @param \SplFileObject|null $file file to upload * @param \SplFileObject|null $file file to upload
* *
* @return $this * @return self
*/ */
public function setFile($file) public function setFile($file)
{ {
@ -274,17 +279,17 @@ class InlineObject1 implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class InlineObject2 implements ModelInterface, ArrayAccess class InlineObject2 implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class InlineObject2 implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'enum_form_string_array' => null, 'enum_form_string_array' => null,
@ -214,8 +219,8 @@ class InlineObject2 implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['enum_form_string_array'] = isset($data['enum_form_string_array']) ? $data['enum_form_string_array'] : null; $this->container['enum_form_string_array'] = $data['enum_form_string_array'] ?? null;
$this->container['enum_form_string'] = isset($data['enum_form_string']) ? $data['enum_form_string'] : '-efg'; $this->container['enum_form_string'] = $data['enum_form_string'] ?? '-efg';
} }
/** /**
@ -265,7 +270,7 @@ class InlineObject2 implements ModelInterface, ArrayAccess
* *
* @param string[]|null $enum_form_string_array Form parameter enum test (string array) * @param string[]|null $enum_form_string_array Form parameter enum test (string array)
* *
* @return $this * @return self
*/ */
public function setEnumFormStringArray($enum_form_string_array) public function setEnumFormStringArray($enum_form_string_array)
{ {
@ -298,7 +303,7 @@ class InlineObject2 implements ModelInterface, ArrayAccess
* *
* @param string|null $enum_form_string Form parameter enum test (string) * @param string|null $enum_form_string Form parameter enum test (string)
* *
* @return $this * @return self
*/ */
public function setEnumFormString($enum_form_string) public function setEnumFormString($enum_form_string)
{ {
@ -332,17 +337,17 @@ class InlineObject2 implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class InlineObject3 implements ModelInterface, ArrayAccess class InlineObject3 implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -77,6 +80,8 @@ class InlineObject3 implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'integer' => null, 'integer' => null,
@ -242,20 +247,20 @@ class InlineObject3 implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['integer'] = isset($data['integer']) ? $data['integer'] : null; $this->container['integer'] = $data['integer'] ?? null;
$this->container['int32'] = isset($data['int32']) ? $data['int32'] : null; $this->container['int32'] = $data['int32'] ?? null;
$this->container['int64'] = isset($data['int64']) ? $data['int64'] : null; $this->container['int64'] = $data['int64'] ?? null;
$this->container['number'] = isset($data['number']) ? $data['number'] : null; $this->container['number'] = $data['number'] ?? null;
$this->container['float'] = isset($data['float']) ? $data['float'] : null; $this->container['float'] = $data['float'] ?? null;
$this->container['double'] = isset($data['double']) ? $data['double'] : null; $this->container['double'] = $data['double'] ?? null;
$this->container['string'] = isset($data['string']) ? $data['string'] : null; $this->container['string'] = $data['string'] ?? null;
$this->container['pattern_without_delimiter'] = isset($data['pattern_without_delimiter']) ? $data['pattern_without_delimiter'] : null; $this->container['pattern_without_delimiter'] = $data['pattern_without_delimiter'] ?? null;
$this->container['byte'] = isset($data['byte']) ? $data['byte'] : null; $this->container['byte'] = $data['byte'] ?? null;
$this->container['binary'] = isset($data['binary']) ? $data['binary'] : null; $this->container['binary'] = $data['binary'] ?? null;
$this->container['date'] = isset($data['date']) ? $data['date'] : null; $this->container['date'] = $data['date'] ?? null;
$this->container['date_time'] = isset($data['date_time']) ? $data['date_time'] : null; $this->container['date_time'] = $data['date_time'] ?? null;
$this->container['password'] = isset($data['password']) ? $data['password'] : null; $this->container['password'] = $data['password'] ?? null;
$this->container['callback'] = isset($data['callback']) ? $data['callback'] : null; $this->container['callback'] = $data['callback'] ?? null;
} }
/** /**
@ -361,7 +366,7 @@ class InlineObject3 implements ModelInterface, ArrayAccess
* *
* @param int|null $integer None * @param int|null $integer None
* *
* @return $this * @return self
*/ */
public function setInteger($integer) public function setInteger($integer)
{ {
@ -393,7 +398,7 @@ class InlineObject3 implements ModelInterface, ArrayAccess
* *
* @param int|null $int32 None * @param int|null $int32 None
* *
* @return $this * @return self
*/ */
public function setInt32($int32) public function setInt32($int32)
{ {
@ -425,7 +430,7 @@ class InlineObject3 implements ModelInterface, ArrayAccess
* *
* @param int|null $int64 None * @param int|null $int64 None
* *
* @return $this * @return self
*/ */
public function setInt64($int64) public function setInt64($int64)
{ {
@ -449,7 +454,7 @@ class InlineObject3 implements ModelInterface, ArrayAccess
* *
* @param float $number None * @param float $number None
* *
* @return $this * @return self
*/ */
public function setNumber($number) public function setNumber($number)
{ {
@ -481,7 +486,7 @@ class InlineObject3 implements ModelInterface, ArrayAccess
* *
* @param float|null $float None * @param float|null $float None
* *
* @return $this * @return self
*/ */
public function setFloat($float) public function setFloat($float)
{ {
@ -510,7 +515,7 @@ class InlineObject3 implements ModelInterface, ArrayAccess
* *
* @param double $double None * @param double $double None
* *
* @return $this * @return self
*/ */
public function setDouble($double) public function setDouble($double)
{ {
@ -542,7 +547,7 @@ class InlineObject3 implements ModelInterface, ArrayAccess
* *
* @param string|null $string None * @param string|null $string None
* *
* @return $this * @return self
*/ */
public function setString($string) public function setString($string)
{ {
@ -571,7 +576,7 @@ class InlineObject3 implements ModelInterface, ArrayAccess
* *
* @param string $pattern_without_delimiter None * @param string $pattern_without_delimiter None
* *
* @return $this * @return self
*/ */
public function setPatternWithoutDelimiter($pattern_without_delimiter) public function setPatternWithoutDelimiter($pattern_without_delimiter)
{ {
@ -600,7 +605,7 @@ class InlineObject3 implements ModelInterface, ArrayAccess
* *
* @param string $byte None * @param string $byte None
* *
* @return $this * @return self
*/ */
public function setByte($byte) public function setByte($byte)
{ {
@ -624,7 +629,7 @@ class InlineObject3 implements ModelInterface, ArrayAccess
* *
* @param \SplFileObject|null $binary None * @param \SplFileObject|null $binary None
* *
* @return $this * @return self
*/ */
public function setBinary($binary) public function setBinary($binary)
{ {
@ -648,7 +653,7 @@ class InlineObject3 implements ModelInterface, ArrayAccess
* *
* @param \DateTime|null $date None * @param \DateTime|null $date None
* *
* @return $this * @return self
*/ */
public function setDate($date) public function setDate($date)
{ {
@ -672,7 +677,7 @@ class InlineObject3 implements ModelInterface, ArrayAccess
* *
* @param \DateTime|null $date_time None * @param \DateTime|null $date_time None
* *
* @return $this * @return self
*/ */
public function setDateTime($date_time) public function setDateTime($date_time)
{ {
@ -696,7 +701,7 @@ class InlineObject3 implements ModelInterface, ArrayAccess
* *
* @param string|null $password None * @param string|null $password None
* *
* @return $this * @return self
*/ */
public function setPassword($password) public function setPassword($password)
{ {
@ -727,7 +732,7 @@ class InlineObject3 implements ModelInterface, ArrayAccess
* *
* @param string|null $callback None * @param string|null $callback None
* *
* @return $this * @return self
*/ */
public function setCallback($callback) public function setCallback($callback)
{ {
@ -752,17 +757,17 @@ class InlineObject3 implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class InlineObject4 implements ModelInterface, ArrayAccess class InlineObject4 implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class InlineObject4 implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'param' => null, 'param' => null,
@ -182,8 +187,8 @@ class InlineObject4 implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['param'] = isset($data['param']) ? $data['param'] : null; $this->container['param'] = $data['param'] ?? null;
$this->container['param2'] = isset($data['param2']) ? $data['param2'] : null; $this->container['param2'] = $data['param2'] ?? null;
} }
/** /**
@ -231,7 +236,7 @@ class InlineObject4 implements ModelInterface, ArrayAccess
* *
* @param string $param field1 * @param string $param field1
* *
* @return $this * @return self
*/ */
public function setParam($param) public function setParam($param)
{ {
@ -255,7 +260,7 @@ class InlineObject4 implements ModelInterface, ArrayAccess
* *
* @param string $param2 field2 * @param string $param2 field2
* *
* @return $this * @return self
*/ */
public function setParam2($param2) public function setParam2($param2)
{ {
@ -280,17 +285,17 @@ class InlineObject4 implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class InlineObject5 implements ModelInterface, ArrayAccess class InlineObject5 implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class InlineObject5 implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'additional_metadata' => null, 'additional_metadata' => null,
@ -182,8 +187,8 @@ class InlineObject5 implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['additional_metadata'] = isset($data['additional_metadata']) ? $data['additional_metadata'] : null; $this->container['additional_metadata'] = $data['additional_metadata'] ?? null;
$this->container['required_file'] = isset($data['required_file']) ? $data['required_file'] : null; $this->container['required_file'] = $data['required_file'] ?? null;
} }
/** /**
@ -228,7 +233,7 @@ class InlineObject5 implements ModelInterface, ArrayAccess
* *
* @param string|null $additional_metadata Additional data to pass to server * @param string|null $additional_metadata Additional data to pass to server
* *
* @return $this * @return self
*/ */
public function setAdditionalMetadata($additional_metadata) public function setAdditionalMetadata($additional_metadata)
{ {
@ -252,7 +257,7 @@ class InlineObject5 implements ModelInterface, ArrayAccess
* *
* @param \SplFileObject $required_file file to upload * @param \SplFileObject $required_file file to upload
* *
* @return $this * @return self
*/ */
public function setRequiredFile($required_file) public function setRequiredFile($required_file)
{ {
@ -277,17 +282,17 @@ class InlineObject5 implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class InlineResponseDefault implements ModelInterface, ArrayAccess class InlineResponseDefault implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -64,6 +67,8 @@ class InlineResponseDefault implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'string' => null 'string' => null
@ -177,7 +182,7 @@ class InlineResponseDefault implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['string'] = isset($data['string']) ? $data['string'] : null; $this->container['string'] = $data['string'] ?? null;
} }
/** /**
@ -219,7 +224,7 @@ class InlineResponseDefault implements ModelInterface, ArrayAccess
* *
* @param \OpenAPI\Client\Model\Foo|null $string string * @param \OpenAPI\Client\Model\Foo|null $string string
* *
* @return $this * @return self
*/ */
public function setString($string) public function setString($string)
{ {
@ -244,17 +249,17 @@ class InlineResponseDefault implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class MapTest implements ModelInterface, ArrayAccess class MapTest implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -67,6 +70,8 @@ class MapTest implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'map_map_of_string' => null, 'map_map_of_string' => null,
@ -207,10 +212,10 @@ class MapTest implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['map_map_of_string'] = isset($data['map_map_of_string']) ? $data['map_map_of_string'] : null; $this->container['map_map_of_string'] = $data['map_map_of_string'] ?? null;
$this->container['map_of_enum_string'] = isset($data['map_of_enum_string']) ? $data['map_of_enum_string'] : null; $this->container['map_of_enum_string'] = $data['map_of_enum_string'] ?? null;
$this->container['direct_map'] = isset($data['direct_map']) ? $data['direct_map'] : null; $this->container['direct_map'] = $data['direct_map'] ?? null;
$this->container['indirect_map'] = isset($data['indirect_map']) ? $data['indirect_map'] : null; $this->container['indirect_map'] = $data['indirect_map'] ?? null;
} }
/** /**
@ -252,7 +257,7 @@ class MapTest implements ModelInterface, ArrayAccess
* *
* @param map[string,map[string,string]]|null $map_map_of_string map_map_of_string * @param map[string,map[string,string]]|null $map_map_of_string map_map_of_string
* *
* @return $this * @return self
*/ */
public function setMapMapOfString($map_map_of_string) public function setMapMapOfString($map_map_of_string)
{ {
@ -276,7 +281,7 @@ class MapTest implements ModelInterface, ArrayAccess
* *
* @param map[string,string]|null $map_of_enum_string map_of_enum_string * @param map[string,string]|null $map_of_enum_string map_of_enum_string
* *
* @return $this * @return self
*/ */
public function setMapOfEnumString($map_of_enum_string) public function setMapOfEnumString($map_of_enum_string)
{ {
@ -309,7 +314,7 @@ class MapTest implements ModelInterface, ArrayAccess
* *
* @param map[string,bool]|null $direct_map direct_map * @param map[string,bool]|null $direct_map direct_map
* *
* @return $this * @return self
*/ */
public function setDirectMap($direct_map) public function setDirectMap($direct_map)
{ {
@ -333,7 +338,7 @@ class MapTest implements ModelInterface, ArrayAccess
* *
* @param map[string,bool]|null $indirect_map indirect_map * @param map[string,bool]|null $indirect_map indirect_map
* *
* @return $this * @return self
*/ */
public function setIndirectMap($indirect_map) public function setIndirectMap($indirect_map)
{ {
@ -358,17 +363,17 @@ class MapTest implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, ArrayAccess class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -66,6 +69,8 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'uuid' => 'uuid', 'uuid' => 'uuid',
@ -187,9 +192,9 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['uuid'] = isset($data['uuid']) ? $data['uuid'] : null; $this->container['uuid'] = $data['uuid'] ?? null;
$this->container['date_time'] = isset($data['date_time']) ? $data['date_time'] : null; $this->container['date_time'] = $data['date_time'] ?? null;
$this->container['map'] = isset($data['map']) ? $data['map'] : null; $this->container['map'] = $data['map'] ?? null;
} }
/** /**
@ -231,7 +236,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
* *
* @param string|null $uuid uuid * @param string|null $uuid uuid
* *
* @return $this * @return self
*/ */
public function setUuid($uuid) public function setUuid($uuid)
{ {
@ -255,7 +260,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
* *
* @param \DateTime|null $date_time date_time * @param \DateTime|null $date_time date_time
* *
* @return $this * @return self
*/ */
public function setDateTime($date_time) public function setDateTime($date_time)
{ {
@ -279,7 +284,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
* *
* @param map[string,\OpenAPI\Client\Model\Animal]|null $map map * @param map[string,\OpenAPI\Client\Model\Animal]|null $map map
* *
* @return $this * @return self
*/ */
public function setMap($map) public function setMap($map)
{ {
@ -304,17 +309,17 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -40,10 +40,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class Model200Response implements ModelInterface, ArrayAccess class Model200Response implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -66,6 +69,8 @@ class Model200Response implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'name' => 'int32', 'name' => 'int32',
@ -183,8 +188,8 @@ class Model200Response implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['name'] = $data['name'] ?? null;
$this->container['class'] = isset($data['class']) ? $data['class'] : null; $this->container['class'] = $data['class'] ?? null;
} }
/** /**
@ -226,7 +231,7 @@ class Model200Response implements ModelInterface, ArrayAccess
* *
* @param int|null $name name * @param int|null $name name
* *
* @return $this * @return self
*/ */
public function setName($name) public function setName($name)
{ {
@ -250,7 +255,7 @@ class Model200Response implements ModelInterface, ArrayAccess
* *
* @param string|null $class class * @param string|null $class class
* *
* @return $this * @return self
*/ */
public function setClass($class) public function setClass($class)
{ {
@ -275,17 +280,17 @@ class Model200Response implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class ModelList implements ModelInterface, ArrayAccess class ModelList implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -64,6 +67,8 @@ class ModelList implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'_123_list' => null '_123_list' => null
@ -177,7 +182,7 @@ class ModelList implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['_123_list'] = isset($data['_123_list']) ? $data['_123_list'] : null; $this->container['_123_list'] = $data['_123_list'] ?? null;
} }
/** /**
@ -219,7 +224,7 @@ class ModelList implements ModelInterface, ArrayAccess
* *
* @param string|null $_123_list _123_list * @param string|null $_123_list _123_list
* *
* @return $this * @return self
*/ */
public function set123List($_123_list) public function set123List($_123_list)
{ {
@ -244,17 +249,17 @@ class ModelList implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -40,10 +40,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class ModelReturn implements ModelInterface, ArrayAccess class ModelReturn implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class ModelReturn implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'return' => 'int32' 'return' => 'int32'
@ -178,7 +183,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['return'] = isset($data['return']) ? $data['return'] : null; $this->container['return'] = $data['return'] ?? null;
} }
/** /**
@ -220,7 +225,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
* *
* @param int|null $return return * @param int|null $return return
* *
* @return $this * @return self
*/ */
public function setReturn($return) public function setReturn($return)
{ {
@ -245,17 +250,17 @@ class ModelReturn implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -40,10 +40,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class Name implements ModelInterface, ArrayAccess class Name implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -68,6 +71,8 @@ class Name implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'name' => 'int32', 'name' => 'int32',
@ -193,10 +198,10 @@ class Name implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['name'] = $data['name'] ?? null;
$this->container['snake_case'] = isset($data['snake_case']) ? $data['snake_case'] : null; $this->container['snake_case'] = $data['snake_case'] ?? null;
$this->container['property'] = isset($data['property']) ? $data['property'] : null; $this->container['property'] = $data['property'] ?? null;
$this->container['_123_number'] = isset($data['_123_number']) ? $data['_123_number'] : null; $this->container['_123_number'] = $data['_123_number'] ?? null;
} }
/** /**
@ -241,7 +246,7 @@ class Name implements ModelInterface, ArrayAccess
* *
* @param int $name name * @param int $name name
* *
* @return $this * @return self
*/ */
public function setName($name) public function setName($name)
{ {
@ -265,7 +270,7 @@ class Name implements ModelInterface, ArrayAccess
* *
* @param int|null $snake_case snake_case * @param int|null $snake_case snake_case
* *
* @return $this * @return self
*/ */
public function setSnakeCase($snake_case) public function setSnakeCase($snake_case)
{ {
@ -289,7 +294,7 @@ class Name implements ModelInterface, ArrayAccess
* *
* @param string|null $property property * @param string|null $property property
* *
* @return $this * @return self
*/ */
public function setProperty($property) public function setProperty($property)
{ {
@ -313,7 +318,7 @@ class Name implements ModelInterface, ArrayAccess
* *
* @param int|null $_123_number _123_number * @param int|null $_123_number _123_number
* *
* @return $this * @return self
*/ */
public function set123Number($_123_number) public function set123Number($_123_number)
{ {
@ -338,17 +343,17 @@ class Name implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class NullableClass implements ModelInterface, ArrayAccess class NullableClass implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -75,6 +78,8 @@ class NullableClass implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'integer_prop' => null, 'integer_prop' => null,
@ -232,18 +237,18 @@ class NullableClass implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['integer_prop'] = isset($data['integer_prop']) ? $data['integer_prop'] : null; $this->container['integer_prop'] = $data['integer_prop'] ?? null;
$this->container['number_prop'] = isset($data['number_prop']) ? $data['number_prop'] : null; $this->container['number_prop'] = $data['number_prop'] ?? null;
$this->container['boolean_prop'] = isset($data['boolean_prop']) ? $data['boolean_prop'] : null; $this->container['boolean_prop'] = $data['boolean_prop'] ?? null;
$this->container['string_prop'] = isset($data['string_prop']) ? $data['string_prop'] : null; $this->container['string_prop'] = $data['string_prop'] ?? null;
$this->container['date_prop'] = isset($data['date_prop']) ? $data['date_prop'] : null; $this->container['date_prop'] = $data['date_prop'] ?? null;
$this->container['datetime_prop'] = isset($data['datetime_prop']) ? $data['datetime_prop'] : null; $this->container['datetime_prop'] = $data['datetime_prop'] ?? null;
$this->container['array_nullable_prop'] = isset($data['array_nullable_prop']) ? $data['array_nullable_prop'] : null; $this->container['array_nullable_prop'] = $data['array_nullable_prop'] ?? null;
$this->container['array_and_items_nullable_prop'] = isset($data['array_and_items_nullable_prop']) ? $data['array_and_items_nullable_prop'] : null; $this->container['array_and_items_nullable_prop'] = $data['array_and_items_nullable_prop'] ?? null;
$this->container['array_items_nullable'] = isset($data['array_items_nullable']) ? $data['array_items_nullable'] : null; $this->container['array_items_nullable'] = $data['array_items_nullable'] ?? null;
$this->container['object_nullable_prop'] = isset($data['object_nullable_prop']) ? $data['object_nullable_prop'] : null; $this->container['object_nullable_prop'] = $data['object_nullable_prop'] ?? null;
$this->container['object_and_items_nullable_prop'] = isset($data['object_and_items_nullable_prop']) ? $data['object_and_items_nullable_prop'] : null; $this->container['object_and_items_nullable_prop'] = $data['object_and_items_nullable_prop'] ?? null;
$this->container['object_items_nullable'] = isset($data['object_items_nullable']) ? $data['object_items_nullable'] : null; $this->container['object_items_nullable'] = $data['object_items_nullable'] ?? null;
} }
/** /**
@ -285,7 +290,7 @@ class NullableClass implements ModelInterface, ArrayAccess
* *
* @param int|null $integer_prop integer_prop * @param int|null $integer_prop integer_prop
* *
* @return $this * @return self
*/ */
public function setIntegerProp($integer_prop) public function setIntegerProp($integer_prop)
{ {
@ -309,7 +314,7 @@ class NullableClass implements ModelInterface, ArrayAccess
* *
* @param float|null $number_prop number_prop * @param float|null $number_prop number_prop
* *
* @return $this * @return self
*/ */
public function setNumberProp($number_prop) public function setNumberProp($number_prop)
{ {
@ -333,7 +338,7 @@ class NullableClass implements ModelInterface, ArrayAccess
* *
* @param bool|null $boolean_prop boolean_prop * @param bool|null $boolean_prop boolean_prop
* *
* @return $this * @return self
*/ */
public function setBooleanProp($boolean_prop) public function setBooleanProp($boolean_prop)
{ {
@ -357,7 +362,7 @@ class NullableClass implements ModelInterface, ArrayAccess
* *
* @param string|null $string_prop string_prop * @param string|null $string_prop string_prop
* *
* @return $this * @return self
*/ */
public function setStringProp($string_prop) public function setStringProp($string_prop)
{ {
@ -381,7 +386,7 @@ class NullableClass implements ModelInterface, ArrayAccess
* *
* @param \DateTime|null $date_prop date_prop * @param \DateTime|null $date_prop date_prop
* *
* @return $this * @return self
*/ */
public function setDateProp($date_prop) public function setDateProp($date_prop)
{ {
@ -405,7 +410,7 @@ class NullableClass implements ModelInterface, ArrayAccess
* *
* @param \DateTime|null $datetime_prop datetime_prop * @param \DateTime|null $datetime_prop datetime_prop
* *
* @return $this * @return self
*/ */
public function setDatetimeProp($datetime_prop) public function setDatetimeProp($datetime_prop)
{ {
@ -429,7 +434,7 @@ class NullableClass implements ModelInterface, ArrayAccess
* *
* @param object[]|null $array_nullable_prop array_nullable_prop * @param object[]|null $array_nullable_prop array_nullable_prop
* *
* @return $this * @return self
*/ */
public function setArrayNullableProp($array_nullable_prop) public function setArrayNullableProp($array_nullable_prop)
{ {
@ -453,7 +458,7 @@ class NullableClass implements ModelInterface, ArrayAccess
* *
* @param object[]|null $array_and_items_nullable_prop array_and_items_nullable_prop * @param object[]|null $array_and_items_nullable_prop array_and_items_nullable_prop
* *
* @return $this * @return self
*/ */
public function setArrayAndItemsNullableProp($array_and_items_nullable_prop) public function setArrayAndItemsNullableProp($array_and_items_nullable_prop)
{ {
@ -477,7 +482,7 @@ class NullableClass implements ModelInterface, ArrayAccess
* *
* @param object[]|null $array_items_nullable array_items_nullable * @param object[]|null $array_items_nullable array_items_nullable
* *
* @return $this * @return self
*/ */
public function setArrayItemsNullable($array_items_nullable) public function setArrayItemsNullable($array_items_nullable)
{ {
@ -501,7 +506,7 @@ class NullableClass implements ModelInterface, ArrayAccess
* *
* @param map[string,object]|null $object_nullable_prop object_nullable_prop * @param map[string,object]|null $object_nullable_prop object_nullable_prop
* *
* @return $this * @return self
*/ */
public function setObjectNullableProp($object_nullable_prop) public function setObjectNullableProp($object_nullable_prop)
{ {
@ -525,7 +530,7 @@ class NullableClass implements ModelInterface, ArrayAccess
* *
* @param map[string,object]|null $object_and_items_nullable_prop object_and_items_nullable_prop * @param map[string,object]|null $object_and_items_nullable_prop object_and_items_nullable_prop
* *
* @return $this * @return self
*/ */
public function setObjectAndItemsNullableProp($object_and_items_nullable_prop) public function setObjectAndItemsNullableProp($object_and_items_nullable_prop)
{ {
@ -549,7 +554,7 @@ class NullableClass implements ModelInterface, ArrayAccess
* *
* @param map[string,object]|null $object_items_nullable object_items_nullable * @param map[string,object]|null $object_items_nullable object_items_nullable
* *
* @return $this * @return self
*/ */
public function setObjectItemsNullable($object_items_nullable) public function setObjectItemsNullable($object_items_nullable)
{ {
@ -574,17 +579,17 @@ class NullableClass implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class NumberOnly implements ModelInterface, ArrayAccess class NumberOnly implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -64,6 +67,8 @@ class NumberOnly implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'just_number' => null 'just_number' => null
@ -177,7 +182,7 @@ class NumberOnly implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['just_number'] = isset($data['just_number']) ? $data['just_number'] : null; $this->container['just_number'] = $data['just_number'] ?? null;
} }
/** /**
@ -219,7 +224,7 @@ class NumberOnly implements ModelInterface, ArrayAccess
* *
* @param float|null $just_number just_number * @param float|null $just_number just_number
* *
* @return $this * @return self
*/ */
public function setJustNumber($just_number) public function setJustNumber($just_number)
{ {
@ -244,17 +249,17 @@ class NumberOnly implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class Order implements ModelInterface, ArrayAccess class Order implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -69,6 +72,8 @@ class Order implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'id' => 'int64', 'id' => 'int64',
@ -219,12 +224,12 @@ class Order implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['id'] = $data['id'] ?? null;
$this->container['pet_id'] = isset($data['pet_id']) ? $data['pet_id'] : null; $this->container['pet_id'] = $data['pet_id'] ?? null;
$this->container['quantity'] = isset($data['quantity']) ? $data['quantity'] : null; $this->container['quantity'] = $data['quantity'] ?? null;
$this->container['ship_date'] = isset($data['ship_date']) ? $data['ship_date'] : null; $this->container['ship_date'] = $data['ship_date'] ?? null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null; $this->container['status'] = $data['status'] ?? null;
$this->container['complete'] = isset($data['complete']) ? $data['complete'] : false; $this->container['complete'] = $data['complete'] ?? false;
} }
/** /**
@ -274,7 +279,7 @@ class Order implements ModelInterface, ArrayAccess
* *
* @param int|null $id id * @param int|null $id id
* *
* @return $this * @return self
*/ */
public function setId($id) public function setId($id)
{ {
@ -298,7 +303,7 @@ class Order implements ModelInterface, ArrayAccess
* *
* @param int|null $pet_id pet_id * @param int|null $pet_id pet_id
* *
* @return $this * @return self
*/ */
public function setPetId($pet_id) public function setPetId($pet_id)
{ {
@ -322,7 +327,7 @@ class Order implements ModelInterface, ArrayAccess
* *
* @param int|null $quantity quantity * @param int|null $quantity quantity
* *
* @return $this * @return self
*/ */
public function setQuantity($quantity) public function setQuantity($quantity)
{ {
@ -346,7 +351,7 @@ class Order implements ModelInterface, ArrayAccess
* *
* @param \DateTime|null $ship_date ship_date * @param \DateTime|null $ship_date ship_date
* *
* @return $this * @return self
*/ */
public function setShipDate($ship_date) public function setShipDate($ship_date)
{ {
@ -370,7 +375,7 @@ class Order implements ModelInterface, ArrayAccess
* *
* @param string|null $status Order Status * @param string|null $status Order Status
* *
* @return $this * @return self
*/ */
public function setStatus($status) public function setStatus($status)
{ {
@ -403,7 +408,7 @@ class Order implements ModelInterface, ArrayAccess
* *
* @param bool|null $complete complete * @param bool|null $complete complete
* *
* @return $this * @return self
*/ */
public function setComplete($complete) public function setComplete($complete)
{ {
@ -428,17 +433,17 @@ class Order implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class OuterComposite implements ModelInterface, ArrayAccess class OuterComposite implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -66,6 +69,8 @@ class OuterComposite implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'my_number' => null, 'my_number' => null,
@ -187,9 +192,9 @@ class OuterComposite implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['my_number'] = isset($data['my_number']) ? $data['my_number'] : null; $this->container['my_number'] = $data['my_number'] ?? null;
$this->container['my_string'] = isset($data['my_string']) ? $data['my_string'] : null; $this->container['my_string'] = $data['my_string'] ?? null;
$this->container['my_boolean'] = isset($data['my_boolean']) ? $data['my_boolean'] : null; $this->container['my_boolean'] = $data['my_boolean'] ?? null;
} }
/** /**
@ -231,7 +236,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
* *
* @param float|null $my_number my_number * @param float|null $my_number my_number
* *
* @return $this * @return self
*/ */
public function setMyNumber($my_number) public function setMyNumber($my_number)
{ {
@ -255,7 +260,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
* *
* @param string|null $my_string my_string * @param string|null $my_string my_string
* *
* @return $this * @return self
*/ */
public function setMyString($my_string) public function setMyString($my_string)
{ {
@ -279,7 +284,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
* *
* @param bool|null $my_boolean my_boolean * @param bool|null $my_boolean my_boolean
* *
* @return $this * @return self
*/ */
public function setMyBoolean($my_boolean) public function setMyBoolean($my_boolean)
{ {
@ -304,17 +309,17 @@ class OuterComposite implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class Pet implements ModelInterface, ArrayAccess class Pet implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -69,6 +72,8 @@ class Pet implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'id' => 'int64', 'id' => 'int64',
@ -219,12 +224,12 @@ class Pet implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['id'] = $data['id'] ?? null;
$this->container['category'] = isset($data['category']) ? $data['category'] : null; $this->container['category'] = $data['category'] ?? null;
$this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['name'] = $data['name'] ?? null;
$this->container['photo_urls'] = isset($data['photo_urls']) ? $data['photo_urls'] : null; $this->container['photo_urls'] = $data['photo_urls'] ?? null;
$this->container['tags'] = isset($data['tags']) ? $data['tags'] : null; $this->container['tags'] = $data['tags'] ?? null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null; $this->container['status'] = $data['status'] ?? null;
} }
/** /**
@ -280,7 +285,7 @@ class Pet implements ModelInterface, ArrayAccess
* *
* @param int|null $id id * @param int|null $id id
* *
* @return $this * @return self
*/ */
public function setId($id) public function setId($id)
{ {
@ -304,7 +309,7 @@ class Pet implements ModelInterface, ArrayAccess
* *
* @param \OpenAPI\Client\Model\Category|null $category category * @param \OpenAPI\Client\Model\Category|null $category category
* *
* @return $this * @return self
*/ */
public function setCategory($category) public function setCategory($category)
{ {
@ -328,7 +333,7 @@ class Pet implements ModelInterface, ArrayAccess
* *
* @param string $name name * @param string $name name
* *
* @return $this * @return self
*/ */
public function setName($name) public function setName($name)
{ {
@ -352,7 +357,7 @@ class Pet implements ModelInterface, ArrayAccess
* *
* @param string[] $photo_urls photo_urls * @param string[] $photo_urls photo_urls
* *
* @return $this * @return self
*/ */
public function setPhotoUrls($photo_urls) public function setPhotoUrls($photo_urls)
{ {
@ -376,7 +381,7 @@ class Pet implements ModelInterface, ArrayAccess
* *
* @param \OpenAPI\Client\Model\Tag[]|null $tags tags * @param \OpenAPI\Client\Model\Tag[]|null $tags tags
* *
* @return $this * @return self
*/ */
public function setTags($tags) public function setTags($tags)
{ {
@ -400,7 +405,7 @@ class Pet implements ModelInterface, ArrayAccess
* *
* @param string|null $status pet status in the store * @param string|null $status pet status in the store
* *
* @return $this * @return self
*/ */
public function setStatus($status) public function setStatus($status)
{ {
@ -434,17 +439,17 @@ class Pet implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class ReadOnlyFirst implements ModelInterface, ArrayAccess class ReadOnlyFirst implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'bar' => null, 'bar' => null,
@ -182,8 +187,8 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['bar'] = isset($data['bar']) ? $data['bar'] : null; $this->container['bar'] = $data['bar'] ?? null;
$this->container['baz'] = isset($data['baz']) ? $data['baz'] : null; $this->container['baz'] = $data['baz'] ?? null;
} }
/** /**
@ -225,7 +230,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
* *
* @param string|null $bar bar * @param string|null $bar bar
* *
* @return $this * @return self
*/ */
public function setBar($bar) public function setBar($bar)
{ {
@ -249,7 +254,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
* *
* @param string|null $baz baz * @param string|null $baz baz
* *
* @return $this * @return self
*/ */
public function setBaz($baz) public function setBaz($baz)
{ {
@ -274,17 +279,17 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class SpecialModelName implements ModelInterface, ArrayAccess class SpecialModelName implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -64,6 +67,8 @@ class SpecialModelName implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'special_property_name' => 'int64' 'special_property_name' => 'int64'
@ -177,7 +182,7 @@ class SpecialModelName implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['special_property_name'] = isset($data['special_property_name']) ? $data['special_property_name'] : null; $this->container['special_property_name'] = $data['special_property_name'] ?? null;
} }
/** /**
@ -219,7 +224,7 @@ class SpecialModelName implements ModelInterface, ArrayAccess
* *
* @param int|null $special_property_name special_property_name * @param int|null $special_property_name special_property_name
* *
* @return $this * @return self
*/ */
public function setSpecialPropertyName($special_property_name) public function setSpecialPropertyName($special_property_name)
{ {
@ -244,17 +249,17 @@ class SpecialModelName implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class Tag implements ModelInterface, ArrayAccess class Tag implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -65,6 +68,8 @@ class Tag implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'id' => 'int64', 'id' => 'int64',
@ -182,8 +187,8 @@ class Tag implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['id'] = $data['id'] ?? null;
$this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['name'] = $data['name'] ?? null;
} }
/** /**
@ -225,7 +230,7 @@ class Tag implements ModelInterface, ArrayAccess
* *
* @param int|null $id id * @param int|null $id id
* *
* @return $this * @return self
*/ */
public function setId($id) public function setId($id)
{ {
@ -249,7 +254,7 @@ class Tag implements ModelInterface, ArrayAccess
* *
* @param string|null $name name * @param string|null $name name
* *
* @return $this * @return self
*/ */
public function setName($name) public function setName($name)
{ {
@ -274,17 +279,17 @@ class Tag implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -39,10 +39,13 @@ use \OpenAPI\Client\ObjectSerializer;
* @package OpenAPI\Client * @package OpenAPI\Client
* @author OpenAPI Generator team * @author OpenAPI Generator team
* @link https://openapi-generator.tech * @link https://openapi-generator.tech
* @implements \ArrayAccess<TKey, TValue>
* @template TKey int|null
* @template TValue mixed|null
*/ */
class User implements ModelInterface, ArrayAccess class User implements ModelInterface, ArrayAccess
{ {
const DISCRIMINATOR = null; public const DISCRIMINATOR = null;
/** /**
* The original name of the model. * The original name of the model.
@ -71,6 +74,8 @@ class User implements ModelInterface, ArrayAccess
* Array of property to format mappings. Used for (de)serialization * Array of property to format mappings. Used for (de)serialization
* *
* @var string[] * @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/ */
protected static $openAPIFormats = [ protected static $openAPIFormats = [
'id' => 'int64', 'id' => 'int64',
@ -212,14 +217,14 @@ class User implements ModelInterface, ArrayAccess
*/ */
public function __construct(array $data = null) public function __construct(array $data = null)
{ {
$this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['id'] = $data['id'] ?? null;
$this->container['username'] = isset($data['username']) ? $data['username'] : null; $this->container['username'] = $data['username'] ?? null;
$this->container['first_name'] = isset($data['first_name']) ? $data['first_name'] : null; $this->container['first_name'] = $data['first_name'] ?? null;
$this->container['last_name'] = isset($data['last_name']) ? $data['last_name'] : null; $this->container['last_name'] = $data['last_name'] ?? null;
$this->container['email'] = isset($data['email']) ? $data['email'] : null; $this->container['email'] = $data['email'] ?? null;
$this->container['password'] = isset($data['password']) ? $data['password'] : null; $this->container['password'] = $data['password'] ?? null;
$this->container['phone'] = isset($data['phone']) ? $data['phone'] : null; $this->container['phone'] = $data['phone'] ?? null;
$this->container['user_status'] = isset($data['user_status']) ? $data['user_status'] : null; $this->container['user_status'] = $data['user_status'] ?? null;
} }
/** /**
@ -261,7 +266,7 @@ class User implements ModelInterface, ArrayAccess
* *
* @param int|null $id id * @param int|null $id id
* *
* @return $this * @return self
*/ */
public function setId($id) public function setId($id)
{ {
@ -285,7 +290,7 @@ class User implements ModelInterface, ArrayAccess
* *
* @param string|null $username username * @param string|null $username username
* *
* @return $this * @return self
*/ */
public function setUsername($username) public function setUsername($username)
{ {
@ -309,7 +314,7 @@ class User implements ModelInterface, ArrayAccess
* *
* @param string|null $first_name first_name * @param string|null $first_name first_name
* *
* @return $this * @return self
*/ */
public function setFirstName($first_name) public function setFirstName($first_name)
{ {
@ -333,7 +338,7 @@ class User implements ModelInterface, ArrayAccess
* *
* @param string|null $last_name last_name * @param string|null $last_name last_name
* *
* @return $this * @return self
*/ */
public function setLastName($last_name) public function setLastName($last_name)
{ {
@ -357,7 +362,7 @@ class User implements ModelInterface, ArrayAccess
* *
* @param string|null $email email * @param string|null $email email
* *
* @return $this * @return self
*/ */
public function setEmail($email) public function setEmail($email)
{ {
@ -381,7 +386,7 @@ class User implements ModelInterface, ArrayAccess
* *
* @param string|null $password password * @param string|null $password password
* *
* @return $this * @return self
*/ */
public function setPassword($password) public function setPassword($password)
{ {
@ -405,7 +410,7 @@ class User implements ModelInterface, ArrayAccess
* *
* @param string|null $phone phone * @param string|null $phone phone
* *
* @return $this * @return self
*/ */
public function setPhone($phone) public function setPhone($phone)
{ {
@ -429,7 +434,7 @@ class User implements ModelInterface, ArrayAccess
* *
* @param int|null $user_status User Status * @param int|null $user_status User Status
* *
* @return $this * @return self
*/ */
public function setUserStatus($user_status) public function setUserStatus($user_status)
{ {
@ -454,17 +459,17 @@ class User implements ModelInterface, ArrayAccess
* *
* @param integer $offset Offset * @param integer $offset Offset
* *
* @return mixed * @return mixed|null
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {
return isset($this->container[$offset]) ? $this->container[$offset] : null; return isset($this->container[$offset]) ?? null;
} }
/** /**
* Sets value based on offset. * Sets value based on offset.
* *
* @param integer $offset Offset * @param int|null $offset Offset
* @param mixed $value Value to be set * @param mixed $value Value to be set
* *
* @return void * @return void

View File

@ -61,20 +61,26 @@ class ObjectSerializer
* @param string $type the OpenAPIToolsType of the data * @param string $type the OpenAPIToolsType of the data
* @param string $format the format of the OpenAPITools type of the data * @param string $format the format of the OpenAPITools type of the data
* *
* @return string|object serialized form of $data * @return scalar|object|array|null serialized form of $data
*/ */
public static function sanitizeForSerialization($data, $type = null, $format = null) public static function sanitizeForSerialization($data, $type = null, $format = null)
{ {
if (is_scalar($data) || null === $data) { if (is_scalar($data) || null === $data) {
return $data; return $data;
} elseif ($data instanceof \DateTime) { }
if ($data instanceof \DateTime) {
return ($format === 'date') ? $data->format('Y-m-d') : $data->format(self::$dateTimeFormat); return ($format === 'date') ? $data->format('Y-m-d') : $data->format(self::$dateTimeFormat);
} elseif (is_array($data)) { }
if (is_array($data)) {
foreach ($data as $property => $value) { foreach ($data as $property => $value) {
$data[$property] = self::sanitizeForSerialization($value); $data[$property] = self::sanitizeForSerialization($value);
} }
return $data; return $data;
} elseif (is_object($data)) { }
if (is_object($data)) {
$values = []; $values = [];
if ($data instanceof ModelInterface) { if ($data instanceof ModelInterface) {
$formats = $data::openAPIFormats(); $formats = $data::openAPIFormats();
@ -260,7 +266,9 @@ class ObjectSerializer
{ {
if (null === $data) { if (null === $data) {
return null; return null;
} elseif (strcasecmp(substr($class, -2), '[]') === 0) { }
if (strcasecmp(substr($class, -2), '[]') === 0) {
$data = is_string($data) ? json_decode($data) : $data; $data = is_string($data) ? json_decode($data) : $data;
if (!is_array($data)) { if (!is_array($data)) {
@ -273,7 +281,9 @@ class ObjectSerializer
$values[] = self::deserialize($value, $subClass, null); $values[] = self::deserialize($value, $subClass, null);
} }
return $values; return $values;
} elseif (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int] }
if (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int]
$data = is_string($data) ? json_decode($data) : $data; $data = is_string($data) ? json_decode($data) : $data;
settype($data, 'array'); settype($data, 'array');
$inner = substr($class, 4, -1); $inner = substr($class, 4, -1);
@ -286,10 +296,14 @@ class ObjectSerializer
} }
} }
return $deserialized; return $deserialized;
} elseif ($class === 'object') { }
if ($class === 'object') {
settype($data, 'array'); settype($data, 'array');
return $data; return $data;
} elseif ($class === '\DateTime') { }
if ($class === '\DateTime') {
// Some API's return an invalid, empty string as a // Some API's return an invalid, empty string as a
// date-time property. DateTime::__construct() will return // date-time property. DateTime::__construct() will return
// the current time for empty input which is probably not // the current time for empty input which is probably not
@ -301,10 +315,14 @@ class ObjectSerializer
} else { } else {
return null; return null;
} }
} elseif (in_array($class, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) { }
if (in_array($class, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) {
settype($data, $class); settype($data, $class);
return $data; return $data;
} elseif ($class === '\SplFileObject') { }
if ($class === '\SplFileObject') {
/** @var \Psr\Http\Message\StreamInterface $data */ /** @var \Psr\Http\Message\StreamInterface $data */
// determine file name // determine file name