[php] Set required PHP version to 7.2 (#6603)

* Set PHP 7.2 as minimum version

* Update PHPUnit to 8 || 9

* Set Bionic environment in Travis config

* PHPUnit 8 requires void return in static methods

* PHPUnit 8 requires void return in static methods

* Fix curl exception message test

When I run "curl http://wrong_host.zxc" output is:
curl: (6) Could not resolve host: wrong_host.zxc
Maybe this message is different across versions.

Tested curl version:
curl 7.54.0 (x86_64-apple-darwin18.0) libcurl/7.54.0 LibreSSL/2.6.5 zlib/1.2.11 nghttp2/1.24.1

* Update assertions of deprecated assertInternalType

* Migrate to expectException method of PHPUnit 8

* Fix PHPCS Fixer errors

* Replace deprecated 'assertRegExp' assertion

* Exclude PHPUnit and php-cs-fixer cache

* Refresh samples

* Set root Travis CI environment to PHP 7.2.5

* Change to 7.3 as 7.2.27 is highest preinstalled

* Fix testWrongHost test
This commit is contained in:
Yuriy Belenko 2020-06-14 17:41:03 +03:00 committed by GitHub
parent e282a052bf
commit 4f1d7c0f04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
285 changed files with 918 additions and 4376 deletions

View File

@ -1,6 +1,10 @@
language: php
# Bionic environment has preinstalled PHP from 7.1 to 7.4
# https://docs.travis-ci.com/user/reference/bionic/#php-support
dist: bionic
php:
- 7.1
- 7.2
- 7.3
- 7.4
before_install: "composer install"
script: "vendor/bin/phpunit"

View File

@ -1,7 +1,7 @@
<?php
/**
* ApiException
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package {{invokerPackage}}

View File

@ -1,7 +1,7 @@
<?php
/**
* Configuration
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package {{invokerPackage}}
@ -20,7 +20,7 @@ namespace {{invokerPackage}};
/**
* Configuration Class Doc Comment
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package {{invokerPackage}}
@ -427,35 +427,35 @@ class Configuration
*/
public function getHostSettings()
{
return array(
return [
{{#servers}}
array(
[
"url" => "{{{url}}}",
"description" => "{{{description}}}{{^description}}No description provided{{/description}}",
{{#variables}}
{{#-first}}
"variables" => array(
"variables" => [
{{/-first}}
"{{{name}}}" => array(
"{{{name}}}" => [
"description" => "{{{description}}}{{^description}}No description provided{{/description}}",
"default_value" => "{{{defaultValue}}}",
{{#enumValues}}
{{#-first}}
"enum_values" => array(
"enum_values" => [
{{/-first}}
"{{{.}}}"{{^-last}},{{/-last}}
{{#-last}}
)
]
{{/-last}}
{{/enumValues}}
){{^-last}},{{/-last}}
]{{^-last}},{{/-last}}
{{#-last}}
)
]
{{/-last}}
{{/variables}}
){{^-last}},{{/-last}}
]{{^-last}},{{/-last}}
{{/servers}}
);
];
}
/**
@ -468,7 +468,7 @@ class Configuration
public function getHostFromSettings($index, $variables = null)
{
if (null === $variables) {
$variables = array();
$variables = [];
}
$hosts = $this->getHostSettings();
@ -484,7 +484,7 @@ class Configuration
// go through variable and assign a value
foreach ($host["variables"] as $name => $variable) {
if (array_key_exists($name, $variables)) { // check to see if it's in the variables provided by the user
if (in_array($variables[$name], $variable["enum_values"])) { // check to see if the value is in the enum
if (in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum
$url = str_replace("{".$name."}", $variables[$name], $url);
} else {
throw new \InvalidArgumentException("The variable `$name` in the host URL has invalid value ".$variables[$name].". Must be ".join(',', $variable["enum_values"]).".");

View File

@ -1,7 +1,7 @@
<?php
/**
* ApiException
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package {{invokerPackage}}

View File

@ -2,7 +2,7 @@
/**
* ModelInterface
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package {{modelPackage}}

View File

@ -2,7 +2,7 @@
/**
* ObjectSerializer
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package {{invokerPackage}}

View File

@ -20,7 +20,7 @@ For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
## Requirements
PHP 7.1 and later
PHP 7.2 and later
## Installation & Usage

View File

@ -1,7 +1,7 @@
<?php
/**
* {{classname}}
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package {{invokerPackage}}

View File

@ -1,7 +1,7 @@
<?php
/**
* {{classname}}Test
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package {{invokerPackage}}
@ -37,28 +37,28 @@ use PHPUnit\Framework\TestCase;
/**
* Setup before running any test cases
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}
{{#operation}}

View File

@ -22,14 +22,14 @@
}
],
"require": {
"php": ">=7.1",
"php": ">=7.2",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^6.2"
},
"require-dev": {
"phpunit/phpunit": "^7.4",
"phpunit/phpunit": "^8.0 || ^9.0",
"friendsofphp/php-cs-fixer": "^2.12"
},
"autoload": {

View File

@ -6,3 +6,9 @@ composer.phar
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
composer.lock
# php-cs-fixer cache
.php_cs.cache
# PHPUnit cache
.phpunit.result.cache

View File

@ -4,7 +4,7 @@
/**
* {{classname}}
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package {{invokerPackage}}

View File

@ -4,7 +4,7 @@
/**
* {{classname}}Test
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package {{invokerPackage}}
@ -38,28 +38,28 @@ class {{classname}}Test extends TestCase
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

View File

@ -6,3 +6,9 @@ composer.phar
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
composer.lock
# php-cs-fixer cache
.php_cs.cache
# PHPUnit cache
.phpunit.result.cache

View File

@ -1,6 +1,10 @@
language: php
# Bionic environment has preinstalled PHP from 7.1 to 7.4
# https://docs.travis-ci.com/user/reference/bionic/#php-support
dist: bionic
php:
- 7.1
- 7.2
- 7.3
- 7.4
before_install: "composer install"
script: "vendor/bin/phpunit"

View File

@ -9,7 +9,7 @@ This PHP package is automatically generated by the [OpenAPI Generator](https://o
## Requirements
PHP 7.1 and later
PHP 7.2 and later
## Installation & Usage

View File

@ -19,14 +19,14 @@
}
],
"require": {
"php": ">=7.1",
"php": ">=7.2",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^6.2"
},
"require-dev": {
"phpunit/phpunit": "^7.4",
"phpunit/phpunit": "^8.0 || ^9.0",
"friendsofphp/php-cs-fixer": "^2.12"
},
"autoload": {

View File

@ -1,7 +1,7 @@
<?php
/**
* AnotherFakeApi
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -1,357 +0,0 @@
<?php
/**
* DefaultApi
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 4.0.0-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Api;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Psr7\MultipartStream;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\RequestOptions;
use OpenAPI\Client\ApiException;
use OpenAPI\Client\Configuration;
use OpenAPI\Client\HeaderSelector;
use OpenAPI\Client\ObjectSerializer;
/**
* DefaultApi Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class DefaultApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
*/
public function __construct(
ClientInterface $client = null,
Configuration $config = null,
HeaderSelector $selector = null
) {
$this->client = $client ?: new Client();
$this->config = $config ?: new Configuration();
$this->headerSelector = $selector ?: new HeaderSelector();
}
/**
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Operation fooGet
*
*
* @throws \OpenAPI\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return \OpenAPI\Client\Model\InlineResponseDefault
*/
public function fooGet()
{
list($response) = $this->fooGetWithHttpInfo();
return $response;
}
/**
* Operation fooGetWithHttpInfo
*
*
* @throws \OpenAPI\Client\ApiException on non-2xx response
* @throws \InvalidArgumentException
* @return array of \OpenAPI\Client\Model\InlineResponseDefault, HTTP status code, HTTP response headers (array of strings)
*/
public function fooGetWithHttpInfo()
{
$request = $this->fooGetRequest();
try {
$options = $this->createHttpClientOption();
try {
$response = $this->client->send($request, $options);
} catch (RequestException $e) {
throw new ApiException(
"[{$e->getCode()}] {$e->getMessage()}",
$e->getCode(),
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
);
}
$statusCode = $response->getStatusCode();
if ($statusCode < 200 || $statusCode > 299) {
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
$responseBody = $response->getBody();
switch($statusCode) {
default:
if ('\OpenAPI\Client\Model\InlineResponseDefault' === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\InlineResponseDefault', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
$returnType = '\OpenAPI\Client\Model\InlineResponseDefault';
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
default:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\OpenAPI\Client\Model\InlineResponseDefault',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation fooGetAsync
*
*
*
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function fooGetAsync()
{
return $this->fooGetAsyncWithHttpInfo()
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation fooGetAsyncWithHttpInfo
*
*
*
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function fooGetAsyncWithHttpInfo()
{
$returnType = '\OpenAPI\Client\Model\InlineResponseDefault';
$request = $this->fooGetRequest();
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
$responseBody = $response->getBody();
if ($returnType === '\SplFileObject') {
$content = $responseBody; //stream goes to serializer
} else {
$content = $responseBody->getContents();
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
},
function ($exception) {
$response = $exception->getResponse();
$statusCode = $response->getStatusCode();
throw new ApiException(
sprintf(
'[%d] Error connecting to the API (%s)',
$statusCode,
$exception->getRequest()->getUri()
),
$statusCode,
$response->getHeaders(),
$response->getBody()
);
}
);
}
/**
* Create request for operation 'fooGet'
*
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function fooGetRequest()
{
$resourcePath = '/foo';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// body params
$_tempBody = null;
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
['application/json']
);
} else {
$headers = $this->headerSelector->selectHeaders(
['application/json'],
[]
);
}
// for model (json/xml)
if (isset($_tempBody)) {
// $_tempBody is the method argument, if present
if ($headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));
} else {
$httpBody = $_tempBody;
}
} elseif (count($formParams) > 0) {
if ($multipart) {
$multipartContents = [];
foreach ($formParams as $formParamName => $formParamValue) {
$multipartContents[] = [
'name' => $formParamName,
'contents' => $formParamValue
];
}
// for HTTP post (form)
$httpBody = new MultipartStream($multipartContents);
} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($formParams);
} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
}
}
$defaultHeaders = [];
if ($this->config->getUserAgent()) {
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
}
$headers = array_merge(
$defaultHeaders,
$headerParams,
$headers
);
$query = \GuzzleHttp\Psr7\build_query($queryParams);
return new Request(
'GET',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}
/**
* Create http client option
*
* @throws \RuntimeException on file opening failure
* @return array of http client options
*/
protected function createHttpClientOption()
{
$options = [];
if ($this->config->getDebug()) {
$options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a');
if (!$options[RequestOptions::DEBUG]) {
throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
}
}
return $options;
}
}

View File

@ -1,7 +1,7 @@
<?php
/**
* FakeApi
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -1,7 +1,7 @@
<?php
/**
* FakeClassnameTags123Api
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -1,7 +1,7 @@
<?php
/**
* PetApi
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -1,7 +1,7 @@
<?php
/**
* StoreApi
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -1,7 +1,7 @@
<?php
/**
* UserApi
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -1,7 +1,7 @@
<?php
/**
* ApiException
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -1,7 +1,7 @@
<?php
/**
* Configuration
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -30,7 +30,7 @@ namespace OpenAPI\Client;
/**
* Configuration Class Doc Comment
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -434,12 +434,12 @@ class Configuration
*/
public function getHostSettings()
{
return array(
array(
return [
[
"url" => "http://petstore.swagger.io:80/v2",
"description" => "No description provided",
)
);
]
];
}
/**
@ -452,7 +452,7 @@ class Configuration
public function getHostFromSettings($index, $variables = null)
{
if (null === $variables) {
$variables = array();
$variables = [];
}
$hosts = $this->getHostSettings();
@ -468,7 +468,7 @@ class Configuration
// go through variable and assign a value
foreach ($host["variables"] as $name => $variable) {
if (array_key_exists($name, $variables)) { // check to see if it's in the variables provided by the user
if (in_array($variables[$name], $variable["enum_values"])) { // check to see if the value is in the enum
if (in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum
$url = str_replace("{".$name."}", $variables[$name], $url);
} else {
throw new \InvalidArgumentException("The variable `$name` in the host URL has invalid value ".$variables[$name].". Must be ".join(',', $variable["enum_values"]).".");

View File

@ -1,7 +1,7 @@
<?php
/**
* ApiException
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* AdditionalPropertiesAnyType
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* AdditionalPropertiesArray
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* AdditionalPropertiesBoolean
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* AdditionalPropertiesClass
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* AdditionalPropertiesInteger
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* AdditionalPropertiesNumber
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* AdditionalPropertiesObject
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* AdditionalPropertiesString
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* Animal
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* ApiResponse
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* ArrayOfArrayOfNumberOnly
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* ArrayOfNumberOnly
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* ArrayTest
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* BigCat
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* BigCatAllOf
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* Capitalization
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* Cat
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* CatAllOf
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* Category
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* ClassModel
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* Client
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* Dog
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* DogAllOf
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* EnumArrays
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* EnumClass
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* EnumTest
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* File
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* FileSchemaTestClass
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -1,297 +0,0 @@
<?php
/**
* Foo
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 4.0.0-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* Foo Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class Foo implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'Foo';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'bar' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPIFormats = [
'bar' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'bar' => 'bar'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'bar' => 'setBar'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'bar' => 'getBar'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['bar'] = isset($data['bar']) ? $data['bar'] : 'bar';
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets bar
*
* @return string|null
*/
public function getBar()
{
return $this->container['bar'];
}
/**
* Sets bar
*
* @param string|null $bar bar
*
* @return $this
*/
public function setBar($bar)
{
$this->container['bar'] = $bar;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
}

View File

@ -2,7 +2,7 @@
/**
* FormatTest
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* HasOnlyReadOnly
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -1,327 +0,0 @@
<?php
/**
* InlineObject
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 4.0.0-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* InlineObject Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class InlineObject implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'inline_object';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'name' => 'string',
'status' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPIFormats = [
'name' => null,
'status' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'name' => 'name',
'status' => 'status'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'name' => 'setName',
'status' => 'setStatus'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'name' => 'getName',
'status' => 'getStatus'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['name'] = isset($data['name']) ? $data['name'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets name
*
* @return string|null
*/
public function getName()
{
return $this->container['name'];
}
/**
* Sets name
*
* @param string|null $name Updated name of the pet
*
* @return $this
*/
public function setName($name)
{
$this->container['name'] = $name;
return $this;
}
/**
* Gets status
*
* @return string|null
*/
public function getStatus()
{
return $this->container['status'];
}
/**
* Sets status
*
* @param string|null $status Updated status of the pet
*
* @return $this
*/
public function setStatus($status)
{
$this->container['status'] = $status;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
}

View File

@ -1,327 +0,0 @@
<?php
/**
* InlineObject1
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 4.0.0-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* InlineObject1 Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class InlineObject1 implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'inline_object_1';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'additional_metadata' => 'string',
'file' => '\SplFileObject'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPIFormats = [
'additional_metadata' => null,
'file' => 'binary'
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'additional_metadata' => 'additionalMetadata',
'file' => 'file'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'additional_metadata' => 'setAdditionalMetadata',
'file' => 'setFile'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'additional_metadata' => 'getAdditionalMetadata',
'file' => 'getFile'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['additional_metadata'] = isset($data['additional_metadata']) ? $data['additional_metadata'] : null;
$this->container['file'] = isset($data['file']) ? $data['file'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets additional_metadata
*
* @return string|null
*/
public function getAdditionalMetadata()
{
return $this->container['additional_metadata'];
}
/**
* Sets additional_metadata
*
* @param string|null $additional_metadata Additional data to pass to server
*
* @return $this
*/
public function setAdditionalMetadata($additional_metadata)
{
$this->container['additional_metadata'] = $additional_metadata;
return $this;
}
/**
* Gets file
*
* @return \SplFileObject|null
*/
public function getFile()
{
return $this->container['file'];
}
/**
* Sets file
*
* @param \SplFileObject|null $file file to upload
*
* @return $this
*/
public function setFile($file)
{
$this->container['file'] = $file;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
}

View File

@ -1,385 +0,0 @@
<?php
/**
* InlineObject2
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 4.0.0-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* InlineObject2 Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class InlineObject2 implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'inline_object_2';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'enum_form_string_array' => 'string[]',
'enum_form_string' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPIFormats = [
'enum_form_string_array' => null,
'enum_form_string' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'enum_form_string_array' => 'enum_form_string_array',
'enum_form_string' => 'enum_form_string'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'enum_form_string_array' => 'setEnumFormStringArray',
'enum_form_string' => 'setEnumFormString'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'enum_form_string_array' => 'getEnumFormStringArray',
'enum_form_string' => 'getEnumFormString'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
const ENUM_FORM_STRING_ARRAY_GREATER_THAN = '>';
const ENUM_FORM_STRING_ARRAY_DOLLAR = '$';
const ENUM_FORM_STRING_ABC = '_abc';
const ENUM_FORM_STRING_EFG = '-efg';
const ENUM_FORM_STRING_XYZ = '(xyz)';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getEnumFormStringArrayAllowableValues()
{
return [
self::ENUM_FORM_STRING_ARRAY_GREATER_THAN,
self::ENUM_FORM_STRING_ARRAY_DOLLAR,
];
}
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getEnumFormStringAllowableValues()
{
return [
self::ENUM_FORM_STRING_ABC,
self::ENUM_FORM_STRING_EFG,
self::ENUM_FORM_STRING_XYZ,
];
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
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'] = isset($data['enum_form_string']) ? $data['enum_form_string'] : '-efg';
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
$allowedValues = $this->getEnumFormStringAllowableValues();
if (!is_null($this->container['enum_form_string']) && !in_array($this->container['enum_form_string'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
"invalid value for 'enum_form_string', must be one of '%s'",
implode("', '", $allowedValues)
);
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets enum_form_string_array
*
* @return string[]|null
*/
public function getEnumFormStringArray()
{
return $this->container['enum_form_string_array'];
}
/**
* Sets enum_form_string_array
*
* @param string[]|null $enum_form_string_array Form parameter enum test (string array)
*
* @return $this
*/
public function setEnumFormStringArray($enum_form_string_array)
{
$allowedValues = $this->getEnumFormStringArrayAllowableValues();
if (!is_null($enum_form_string_array) && array_diff($enum_form_string_array, $allowedValues)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'enum_form_string_array', must be one of '%s'",
implode("', '", $allowedValues)
)
);
}
$this->container['enum_form_string_array'] = $enum_form_string_array;
return $this;
}
/**
* Gets enum_form_string
*
* @return string|null
*/
public function getEnumFormString()
{
return $this->container['enum_form_string'];
}
/**
* Sets enum_form_string
*
* @param string|null $enum_form_string Form parameter enum test (string)
*
* @return $this
*/
public function setEnumFormString($enum_form_string)
{
$allowedValues = $this->getEnumFormStringAllowableValues();
if (!is_null($enum_form_string) && !in_array($enum_form_string, $allowedValues, true)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'enum_form_string', must be one of '%s'",
implode("', '", $allowedValues)
)
);
}
$this->container['enum_form_string'] = $enum_form_string;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
}

View File

@ -1,805 +0,0 @@
<?php
/**
* InlineObject3
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 4.0.0-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* InlineObject3 Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class InlineObject3 implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'inline_object_3';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'integer' => 'int',
'int32' => 'int',
'int64' => 'int',
'number' => 'float',
'float' => 'float',
'double' => 'double',
'string' => 'string',
'pattern_without_delimiter' => 'string',
'byte' => 'string',
'binary' => '\SplFileObject',
'date' => '\DateTime',
'date_time' => '\DateTime',
'password' => 'string',
'callback' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPIFormats = [
'integer' => 'int32',
'int32' => 'int32',
'int64' => 'int64',
'number' => null,
'float' => 'float',
'double' => 'double',
'string' => null,
'pattern_without_delimiter' => null,
'byte' => 'byte',
'binary' => 'binary',
'date' => 'date',
'date_time' => 'date-time',
'password' => 'password',
'callback' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'integer' => 'integer',
'int32' => 'int32',
'int64' => 'int64',
'number' => 'number',
'float' => 'float',
'double' => 'double',
'string' => 'string',
'pattern_without_delimiter' => 'pattern_without_delimiter',
'byte' => 'byte',
'binary' => 'binary',
'date' => 'date',
'date_time' => 'dateTime',
'password' => 'password',
'callback' => 'callback'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'integer' => 'setInteger',
'int32' => 'setInt32',
'int64' => 'setInt64',
'number' => 'setNumber',
'float' => 'setFloat',
'double' => 'setDouble',
'string' => 'setString',
'pattern_without_delimiter' => 'setPatternWithoutDelimiter',
'byte' => 'setByte',
'binary' => 'setBinary',
'date' => 'setDate',
'date_time' => 'setDateTime',
'password' => 'setPassword',
'callback' => 'setCallback'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'integer' => 'getInteger',
'int32' => 'getInt32',
'int64' => 'getInt64',
'number' => 'getNumber',
'float' => 'getFloat',
'double' => 'getDouble',
'string' => 'getString',
'pattern_without_delimiter' => 'getPatternWithoutDelimiter',
'byte' => 'getByte',
'binary' => 'getBinary',
'date' => 'getDate',
'date_time' => 'getDateTime',
'password' => 'getPassword',
'callback' => 'getCallback'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['integer'] = isset($data['integer']) ? $data['integer'] : null;
$this->container['int32'] = isset($data['int32']) ? $data['int32'] : null;
$this->container['int64'] = isset($data['int64']) ? $data['int64'] : null;
$this->container['number'] = isset($data['number']) ? $data['number'] : null;
$this->container['float'] = isset($data['float']) ? $data['float'] : null;
$this->container['double'] = isset($data['double']) ? $data['double'] : null;
$this->container['string'] = isset($data['string']) ? $data['string'] : null;
$this->container['pattern_without_delimiter'] = isset($data['pattern_without_delimiter']) ? $data['pattern_without_delimiter'] : null;
$this->container['byte'] = isset($data['byte']) ? $data['byte'] : null;
$this->container['binary'] = isset($data['binary']) ? $data['binary'] : null;
$this->container['date'] = isset($data['date']) ? $data['date'] : null;
$this->container['date_time'] = isset($data['date_time']) ? $data['date_time'] : null;
$this->container['password'] = isset($data['password']) ? $data['password'] : null;
$this->container['callback'] = isset($data['callback']) ? $data['callback'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if (!is_null($this->container['integer']) && ($this->container['integer'] > 100)) {
$invalidProperties[] = "invalid value for 'integer', must be smaller than or equal to 100.";
}
if (!is_null($this->container['integer']) && ($this->container['integer'] < 10)) {
$invalidProperties[] = "invalid value for 'integer', must be bigger than or equal to 10.";
}
if (!is_null($this->container['int32']) && ($this->container['int32'] > 200)) {
$invalidProperties[] = "invalid value for 'int32', must be smaller than or equal to 200.";
}
if (!is_null($this->container['int32']) && ($this->container['int32'] < 20)) {
$invalidProperties[] = "invalid value for 'int32', must be bigger than or equal to 20.";
}
if ($this->container['number'] === null) {
$invalidProperties[] = "'number' can't be null";
}
if (($this->container['number'] > 543.2)) {
$invalidProperties[] = "invalid value for 'number', must be smaller than or equal to 543.2.";
}
if (($this->container['number'] < 32.1)) {
$invalidProperties[] = "invalid value for 'number', must be bigger than or equal to 32.1.";
}
if (!is_null($this->container['float']) && ($this->container['float'] > 987.6)) {
$invalidProperties[] = "invalid value for 'float', must be smaller than or equal to 987.6.";
}
if ($this->container['double'] === null) {
$invalidProperties[] = "'double' can't be null";
}
if (($this->container['double'] > 123.4)) {
$invalidProperties[] = "invalid value for 'double', must be smaller than or equal to 123.4.";
}
if (($this->container['double'] < 67.8)) {
$invalidProperties[] = "invalid value for 'double', must be bigger than or equal to 67.8.";
}
if (!is_null($this->container['string']) && !preg_match("/[a-z]/i", $this->container['string'])) {
$invalidProperties[] = "invalid value for 'string', must be conform to the pattern /[a-z]/i.";
}
if ($this->container['pattern_without_delimiter'] === null) {
$invalidProperties[] = "'pattern_without_delimiter' can't be null";
}
if (!preg_match("/^[A-Z].*/", $this->container['pattern_without_delimiter'])) {
$invalidProperties[] = "invalid value for 'pattern_without_delimiter', must be conform to the pattern /^[A-Z].*/.";
}
if ($this->container['byte'] === null) {
$invalidProperties[] = "'byte' can't be null";
}
if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) > 64)) {
$invalidProperties[] = "invalid value for 'password', the character length must be smaller than or equal to 64.";
}
if (!is_null($this->container['password']) && (mb_strlen($this->container['password']) < 10)) {
$invalidProperties[] = "invalid value for 'password', the character length must be bigger than or equal to 10.";
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets integer
*
* @return int|null
*/
public function getInteger()
{
return $this->container['integer'];
}
/**
* Sets integer
*
* @param int|null $integer None
*
* @return $this
*/
public function setInteger($integer)
{
if (!is_null($integer) && ($integer > 100)) {
throw new \InvalidArgumentException('invalid value for $integer when calling InlineObject3., must be smaller than or equal to 100.');
}
if (!is_null($integer) && ($integer < 10)) {
throw new \InvalidArgumentException('invalid value for $integer when calling InlineObject3., must be bigger than or equal to 10.');
}
$this->container['integer'] = $integer;
return $this;
}
/**
* Gets int32
*
* @return int|null
*/
public function getInt32()
{
return $this->container['int32'];
}
/**
* Sets int32
*
* @param int|null $int32 None
*
* @return $this
*/
public function setInt32($int32)
{
if (!is_null($int32) && ($int32 > 200)) {
throw new \InvalidArgumentException('invalid value for $int32 when calling InlineObject3., must be smaller than or equal to 200.');
}
if (!is_null($int32) && ($int32 < 20)) {
throw new \InvalidArgumentException('invalid value for $int32 when calling InlineObject3., must be bigger than or equal to 20.');
}
$this->container['int32'] = $int32;
return $this;
}
/**
* Gets int64
*
* @return int|null
*/
public function getInt64()
{
return $this->container['int64'];
}
/**
* Sets int64
*
* @param int|null $int64 None
*
* @return $this
*/
public function setInt64($int64)
{
$this->container['int64'] = $int64;
return $this;
}
/**
* Gets number
*
* @return float
*/
public function getNumber()
{
return $this->container['number'];
}
/**
* Sets number
*
* @param float $number None
*
* @return $this
*/
public function setNumber($number)
{
if (($number > 543.2)) {
throw new \InvalidArgumentException('invalid value for $number when calling InlineObject3., must be smaller than or equal to 543.2.');
}
if (($number < 32.1)) {
throw new \InvalidArgumentException('invalid value for $number when calling InlineObject3., must be bigger than or equal to 32.1.');
}
$this->container['number'] = $number;
return $this;
}
/**
* Gets float
*
* @return float|null
*/
public function getFloat()
{
return $this->container['float'];
}
/**
* Sets float
*
* @param float|null $float None
*
* @return $this
*/
public function setFloat($float)
{
if (!is_null($float) && ($float > 987.6)) {
throw new \InvalidArgumentException('invalid value for $float when calling InlineObject3., must be smaller than or equal to 987.6.');
}
$this->container['float'] = $float;
return $this;
}
/**
* Gets double
*
* @return double
*/
public function getDouble()
{
return $this->container['double'];
}
/**
* Sets double
*
* @param double $double None
*
* @return $this
*/
public function setDouble($double)
{
if (($double > 123.4)) {
throw new \InvalidArgumentException('invalid value for $double when calling InlineObject3., must be smaller than or equal to 123.4.');
}
if (($double < 67.8)) {
throw new \InvalidArgumentException('invalid value for $double when calling InlineObject3., must be bigger than or equal to 67.8.');
}
$this->container['double'] = $double;
return $this;
}
/**
* Gets string
*
* @return string|null
*/
public function getString()
{
return $this->container['string'];
}
/**
* Sets string
*
* @param string|null $string None
*
* @return $this
*/
public function setString($string)
{
if (!is_null($string) && (!preg_match("/[a-z]/i", $string))) {
throw new \InvalidArgumentException("invalid value for $string when calling InlineObject3., must conform to the pattern /[a-z]/i.");
}
$this->container['string'] = $string;
return $this;
}
/**
* Gets pattern_without_delimiter
*
* @return string
*/
public function getPatternWithoutDelimiter()
{
return $this->container['pattern_without_delimiter'];
}
/**
* Sets pattern_without_delimiter
*
* @param string $pattern_without_delimiter None
*
* @return $this
*/
public function setPatternWithoutDelimiter($pattern_without_delimiter)
{
if ((!preg_match("/^[A-Z].*/", $pattern_without_delimiter))) {
throw new \InvalidArgumentException("invalid value for $pattern_without_delimiter when calling InlineObject3., must conform to the pattern /^[A-Z].*/.");
}
$this->container['pattern_without_delimiter'] = $pattern_without_delimiter;
return $this;
}
/**
* Gets byte
*
* @return string
*/
public function getByte()
{
return $this->container['byte'];
}
/**
* Sets byte
*
* @param string $byte None
*
* @return $this
*/
public function setByte($byte)
{
$this->container['byte'] = $byte;
return $this;
}
/**
* Gets binary
*
* @return \SplFileObject|null
*/
public function getBinary()
{
return $this->container['binary'];
}
/**
* Sets binary
*
* @param \SplFileObject|null $binary None
*
* @return $this
*/
public function setBinary($binary)
{
$this->container['binary'] = $binary;
return $this;
}
/**
* Gets date
*
* @return \DateTime|null
*/
public function getDate()
{
return $this->container['date'];
}
/**
* Sets date
*
* @param \DateTime|null $date None
*
* @return $this
*/
public function setDate($date)
{
$this->container['date'] = $date;
return $this;
}
/**
* Gets date_time
*
* @return \DateTime|null
*/
public function getDateTime()
{
return $this->container['date_time'];
}
/**
* Sets date_time
*
* @param \DateTime|null $date_time None
*
* @return $this
*/
public function setDateTime($date_time)
{
$this->container['date_time'] = $date_time;
return $this;
}
/**
* Gets password
*
* @return string|null
*/
public function getPassword()
{
return $this->container['password'];
}
/**
* Sets password
*
* @param string|null $password None
*
* @return $this
*/
public function setPassword($password)
{
if (!is_null($password) && (mb_strlen($password) > 64)) {
throw new \InvalidArgumentException('invalid length for $password when calling InlineObject3., must be smaller than or equal to 64.');
}
if (!is_null($password) && (mb_strlen($password) < 10)) {
throw new \InvalidArgumentException('invalid length for $password when calling InlineObject3., must be bigger than or equal to 10.');
}
$this->container['password'] = $password;
return $this;
}
/**
* Gets callback
*
* @return string|null
*/
public function getCallback()
{
return $this->container['callback'];
}
/**
* Sets callback
*
* @param string|null $callback None
*
* @return $this
*/
public function setCallback($callback)
{
$this->container['callback'] = $callback;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
}

View File

@ -1,333 +0,0 @@
<?php
/**
* InlineObject4
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 4.0.0-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* InlineObject4 Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class InlineObject4 implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'inline_object_4';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'param' => 'string',
'param2' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPIFormats = [
'param' => null,
'param2' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'param' => 'param',
'param2' => 'param2'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'param' => 'setParam',
'param2' => 'setParam2'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'param' => 'getParam',
'param2' => 'getParam2'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['param'] = isset($data['param']) ? $data['param'] : null;
$this->container['param2'] = isset($data['param2']) ? $data['param2'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['param'] === null) {
$invalidProperties[] = "'param' can't be null";
}
if ($this->container['param2'] === null) {
$invalidProperties[] = "'param2' can't be null";
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets param
*
* @return string
*/
public function getParam()
{
return $this->container['param'];
}
/**
* Sets param
*
* @param string $param field1
*
* @return $this
*/
public function setParam($param)
{
$this->container['param'] = $param;
return $this;
}
/**
* Gets param2
*
* @return string
*/
public function getParam2()
{
return $this->container['param2'];
}
/**
* Sets param2
*
* @param string $param2 field2
*
* @return $this
*/
public function setParam2($param2)
{
$this->container['param2'] = $param2;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
}

View File

@ -1,330 +0,0 @@
<?php
/**
* InlineObject5
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 4.0.0-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* InlineObject5 Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class InlineObject5 implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'inline_object_5';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'additional_metadata' => 'string',
'required_file' => '\SplFileObject'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPIFormats = [
'additional_metadata' => null,
'required_file' => 'binary'
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'additional_metadata' => 'additionalMetadata',
'required_file' => 'requiredFile'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'additional_metadata' => 'setAdditionalMetadata',
'required_file' => 'setRequiredFile'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'additional_metadata' => 'getAdditionalMetadata',
'required_file' => 'getRequiredFile'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['additional_metadata'] = isset($data['additional_metadata']) ? $data['additional_metadata'] : null;
$this->container['required_file'] = isset($data['required_file']) ? $data['required_file'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['required_file'] === null) {
$invalidProperties[] = "'required_file' can't be null";
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets additional_metadata
*
* @return string|null
*/
public function getAdditionalMetadata()
{
return $this->container['additional_metadata'];
}
/**
* Sets additional_metadata
*
* @param string|null $additional_metadata Additional data to pass to server
*
* @return $this
*/
public function setAdditionalMetadata($additional_metadata)
{
$this->container['additional_metadata'] = $additional_metadata;
return $this;
}
/**
* Gets required_file
*
* @return \SplFileObject
*/
public function getRequiredFile()
{
return $this->container['required_file'];
}
/**
* Sets required_file
*
* @param \SplFileObject $required_file file to upload
*
* @return $this
*/
public function setRequiredFile($required_file)
{
$this->container['required_file'] = $required_file;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
}

View File

@ -1,297 +0,0 @@
<?php
/**
* InlineResponseDefault
*
* PHP version 5
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
*
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 4.0.0-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \ArrayAccess;
use \OpenAPI\Client\ObjectSerializer;
/**
* InlineResponseDefault Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class InlineResponseDefault implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'inline_response_default';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'string' => '\OpenAPI\Client\Model\Foo'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPIFormats = [
'string' => null
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes()
{
return self::$openAPITypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats()
{
return self::$openAPIFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'string' => 'string'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'string' => 'setString'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'string' => 'getString'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$openAPIModelName;
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['string'] = isset($data['string']) ? $data['string'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets string
*
* @return \OpenAPI\Client\Model\Foo|null
*/
public function getString()
{
return $this->container['string'];
}
/**
* Sets string
*
* @param \OpenAPI\Client\Model\Foo|null $string string
*
* @return $this
*/
public function setString($string)
{
$this->container['string'] = $string;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
}

View File

@ -2,7 +2,7 @@
/**
* MapTest
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* MixedPropertiesAndAdditionalPropertiesClass
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* Model200Response
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* ModelInterface
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client\Model

View File

@ -2,7 +2,7 @@
/**
* ModelList
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* ModelReturn
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* Name
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* NumberOnly
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* Order
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* OuterComposite
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* OuterEnum
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* Pet
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* ReadOnlyFirst
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* SpecialModelName
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* Tag
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* TypeHolderDefault
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* TypeHolderExample
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* User
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* XmlItem
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -2,7 +2,7 @@
/**
* ObjectSerializer
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client

View File

@ -1,7 +1,7 @@
<?php
/**
* AnotherFakeApiTest
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -47,28 +47,28 @@ class AnotherFakeApiTest extends TestCase
/**
* Setup before running any test cases
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

View File

@ -1,7 +1,7 @@
<?php
/**
* FakeApiTest
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -47,28 +47,28 @@ class FakeApiTest extends TestCase
/**
* Setup before running any test cases
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

View File

@ -1,7 +1,7 @@
<?php
/**
* FakeClassnameTags123ApiTest
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -47,28 +47,28 @@ class FakeClassnameTags123ApiTest extends TestCase
/**
* Setup before running any test cases
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

View File

@ -1,7 +1,7 @@
<?php
/**
* PetApiTest
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -47,28 +47,28 @@ class PetApiTest extends TestCase
/**
* Setup before running any test cases
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

View File

@ -1,7 +1,7 @@
<?php
/**
* StoreApiTest
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -47,28 +47,28 @@ class StoreApiTest extends TestCase
/**
* Setup before running any test cases
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

View File

@ -1,7 +1,7 @@
<?php
/**
* UserApiTest
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -47,28 +47,28 @@ class UserApiTest extends TestCase
/**
* Setup before running any test cases
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

View File

@ -2,7 +2,7 @@
/**
* AdditionalPropertiesAnyTypeTest
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -46,28 +46,28 @@ class AdditionalPropertiesAnyTypeTest extends TestCase
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

View File

@ -2,7 +2,7 @@
/**
* AdditionalPropertiesArrayTest
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -46,28 +46,28 @@ class AdditionalPropertiesArrayTest extends TestCase
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

View File

@ -2,7 +2,7 @@
/**
* AdditionalPropertiesBooleanTest
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -46,28 +46,28 @@ class AdditionalPropertiesBooleanTest extends TestCase
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

View File

@ -2,7 +2,7 @@
/**
* AdditionalPropertiesClassTest
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -46,28 +46,28 @@ class AdditionalPropertiesClassTest extends TestCase
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

View File

@ -2,7 +2,7 @@
/**
* AdditionalPropertiesIntegerTest
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -46,28 +46,28 @@ class AdditionalPropertiesIntegerTest extends TestCase
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

View File

@ -2,7 +2,7 @@
/**
* AdditionalPropertiesNumberTest
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -46,28 +46,28 @@ class AdditionalPropertiesNumberTest extends TestCase
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

View File

@ -2,7 +2,7 @@
/**
* AdditionalPropertiesObjectTest
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -46,28 +46,28 @@ class AdditionalPropertiesObjectTest extends TestCase
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

View File

@ -2,7 +2,7 @@
/**
* AdditionalPropertiesStringTest
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -46,28 +46,28 @@ class AdditionalPropertiesStringTest extends TestCase
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

View File

@ -2,7 +2,7 @@
/**
* AnimalTest
*
* PHP version 7.1
* PHP version 7.2
*
* @category Class
* @package OpenAPI\Client
@ -46,28 +46,28 @@ class AnimalTest extends TestCase
/**
* Setup before running any test case
*/
public static function setUpBeforeClass()
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp()
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown()
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass()
public static function tearDownAfterClass(): void
{
}

Some files were not shown because too many files have changed in this diff Show More