forked from loafle/openapi-generator-original
parent
c30afdf775
commit
3beeb4e777
@ -267,7 +267,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
|
||||
/**
|
||||
* Gets {{name}}
|
||||
*
|
||||
* @return {{dataType}}
|
||||
* @return {{dataType}}{{^required}}|null{{/required}}
|
||||
*/
|
||||
public function {{getter}}()
|
||||
{
|
||||
@ -277,7 +277,7 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}{{^pa
|
||||
/**
|
||||
* Sets {{name}}
|
||||
*
|
||||
* @param {{dataType}} ${{name}}{{#description}} {{{description}}}{{/description}}{{^description}} {{{name}}}{{/description}}
|
||||
* @param {{dataType}}{{^required}}|null{{/required}} ${{name}}{{#description}} {{{description}}}{{/description}}{{^description}} {{{name}}}{{/description}}
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
return Symfony\CS\Config::create()
|
||||
->level(Symfony\CS\FixerInterface::PSR2_LEVEL)
|
||||
->setUsingCache(true)
|
||||
->fixers(
|
||||
[
|
||||
'ordered_use',
|
||||
'phpdoc_order',
|
||||
'short_array_syntax',
|
||||
'strict',
|
||||
'strict_param'
|
||||
]
|
||||
)
|
||||
->finder(
|
||||
Symfony\CS\Finder\DefaultFinder::create()
|
||||
->in(__DIR__)
|
||||
);
|
@ -0,0 +1,10 @@
|
||||
language: php
|
||||
sudo: false
|
||||
php:
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
- 7.0
|
||||
- hhvm
|
||||
before_install: "composer install"
|
||||
script: "vendor/bin/phpunit"
|
@ -0,0 +1,112 @@
|
||||
# OpenAPIClient-php
|
||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end --
|
||||
|
||||
This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
- Build package: org.openapitools.codegen.languages.PhpClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
||||
PHP 5.5 and later
|
||||
|
||||
## Installation & Usage
|
||||
### Composer
|
||||
|
||||
To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:
|
||||
|
||||
```
|
||||
{
|
||||
"repositories": [
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Then run `composer install`
|
||||
|
||||
### Manual Installation
|
||||
|
||||
Download the files and include `autoload.php`:
|
||||
|
||||
```php
|
||||
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
To run the unit tests:
|
||||
|
||||
```
|
||||
composer install
|
||||
./vendor/bin/phpunit
|
||||
```
|
||||
|
||||
## Getting Started
|
||||
|
||||
Please follow the [installation procedure](#installation--usage) and then run the following:
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\FakeApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$unknown_base_type = new \OpenAPI\Client\Model\UNKNOWN_BASE_TYPE(); // object |
|
||||
|
||||
try {
|
||||
$apiInstance->testCodeInjectEndRnNR($unknown_base_type);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling FakeApi->testCodeInjectEndRnNR: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
|
||||
?>
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to *petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*FakeApi* | [**testCodeInjectEndRnNR**](docs/Api/FakeApi.md#testcodeinjectendrnnr) | **PUT** /fake | To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
|
||||
|
||||
## Documentation For Models
|
||||
|
||||
- [ModelReturn](docs/Model/ModelReturn.md)
|
||||
|
||||
|
||||
## Documentation For Authorization
|
||||
|
||||
|
||||
## api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key */ ' " =end -- \r\n \n \r
|
||||
- **Location**: HTTP header
|
||||
|
||||
## petstore_auth
|
||||
|
||||
- **Type**: OAuth
|
||||
- **Flow**: implicit
|
||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||
- **Scopes**:
|
||||
- **write:pets**: modify pets in your account *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
- **read:pets**: read your pets *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
|
||||
|
||||
## Author
|
||||
|
||||
something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
|
||||
|
@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "GIT_USER_ID/GIT_REPO_ID",
|
||||
"description": "",
|
||||
"keywords": [
|
||||
"openapitools",
|
||||
"openapi-generator",
|
||||
"php",
|
||||
"sdk",
|
||||
"rest",
|
||||
"api"
|
||||
],
|
||||
"homepage": "http://openapi-generator.tech",
|
||||
"license": "proprietary",
|
||||
"authors": [
|
||||
{
|
||||
"name": "OpenAPI-Generator contributors",
|
||||
"homepage": "https://openapi-generator.tech"
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.5",
|
||||
"ext-curl": "*",
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
"guzzlehttp/guzzle": "^6.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8",
|
||||
"squizlabs/php_codesniffer": "~2.6",
|
||||
"friendsofphp/php-cs-fixer": "~1.12"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "OpenAPI\\Client\\" : "lib/" }
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": { "OpenAPI\\Client\\" : "test/" }
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
# OpenAPI\Client\FakeApi
|
||||
|
||||
All URIs are relative to *petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**testCodeInjectEndRnNR**](FakeApi.md#testCodeInjectEndRnNR) | **PUT** /fake | To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
|
||||
|
||||
# **testCodeInjectEndRnNR**
|
||||
> testCodeInjectEndRnNR($unknown_base_type)
|
||||
|
||||
To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
|
||||
### Example
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
$apiInstance = new OpenAPI\Client\Api\FakeApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client()
|
||||
);
|
||||
$unknown_base_type = new \OpenAPI\Client\Model\UNKNOWN_BASE_TYPE(); // object |
|
||||
|
||||
try {
|
||||
$apiInstance->testCodeInjectEndRnNR($unknown_base_type);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling FakeApi->testCodeInjectEndRnNR: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
?>
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**unknown_base_type** | [**object**](../Model/UNKNOWN_BASE_TYPE.md)| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, *_/ \" =end --
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
||||
|
@ -0,0 +1,10 @@
|
||||
# ModelReturn
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**return** | **int** | property description *_/ ' \" =end -- \\r\\n \\n \\r | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -0,0 +1,52 @@
|
||||
#!/bin/sh
|
||||
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||
#
|
||||
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
|
||||
|
||||
git_user_id=$1
|
||||
git_repo_id=$2
|
||||
release_note=$3
|
||||
|
||||
if [ "$git_user_id" = "" ]; then
|
||||
git_user_id="GIT_USER_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||
fi
|
||||
|
||||
if [ "$git_repo_id" = "" ]; then
|
||||
git_repo_id="GIT_REPO_ID"
|
||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||
fi
|
||||
|
||||
if [ "$release_note" = "" ]; then
|
||||
release_note="Minor update"
|
||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||
fi
|
||||
|
||||
# Initialize the local directory as a Git repository
|
||||
git init
|
||||
|
||||
# Adds the files in the local repository and stages them for commit.
|
||||
git add .
|
||||
|
||||
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||
git commit -m "$release_note"
|
||||
|
||||
# Sets the new remote
|
||||
git_remote=`git remote`
|
||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||
|
||||
if [ "$GIT_TOKEN" = "" ]; then
|
||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||
else
|
||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
git pull origin master
|
||||
|
||||
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
||||
git push origin master 2>&1 | grep -v 'To https'
|
||||
|
@ -0,0 +1,322 @@
|
||||
<?php
|
||||
/**
|
||||
* FakeApi
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end --
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.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;
|
||||
|
||||
/**
|
||||
* FakeApi Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class FakeApi
|
||||
{
|
||||
/**
|
||||
* @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 testCodeInjectEndRnNR
|
||||
*
|
||||
* To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*
|
||||
* @param object $unknown_base_type unknown_base_type (optional)
|
||||
*
|
||||
* @throws \OpenAPI\Client\ApiException on non-2xx response
|
||||
* @throws \InvalidArgumentException
|
||||
* @return void
|
||||
*/
|
||||
public function testCodeInjectEndRnNR($unknown_base_type = null)
|
||||
{
|
||||
$this->testCodeInjectEndRnNRWithHttpInfo($unknown_base_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation testCodeInjectEndRnNRWithHttpInfo
|
||||
*
|
||||
* To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*
|
||||
* @param object $unknown_base_type (optional)
|
||||
*
|
||||
* @throws \OpenAPI\Client\ApiException on non-2xx response
|
||||
* @throws \InvalidArgumentException
|
||||
* @return array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
*/
|
||||
public function testCodeInjectEndRnNRWithHttpInfo($unknown_base_type = null)
|
||||
{
|
||||
$returnType = '';
|
||||
$request = $this->testCodeInjectEndRnNRRequest($unknown_base_type);
|
||||
|
||||
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()
|
||||
);
|
||||
}
|
||||
|
||||
return [null, $statusCode, $response->getHeaders()];
|
||||
|
||||
} catch (ApiException $e) {
|
||||
switch ($e->getCode()) {
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation testCodeInjectEndRnNRAsync
|
||||
*
|
||||
* To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*
|
||||
* @param object $unknown_base_type (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function testCodeInjectEndRnNRAsync($unknown_base_type = null)
|
||||
{
|
||||
return $this->testCodeInjectEndRnNRAsyncWithHttpInfo($unknown_base_type)
|
||||
->then(
|
||||
function ($response) {
|
||||
return $response[0];
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation testCodeInjectEndRnNRAsyncWithHttpInfo
|
||||
*
|
||||
* To test code injection *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*
|
||||
* @param object $unknown_base_type (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function testCodeInjectEndRnNRAsyncWithHttpInfo($unknown_base_type = null)
|
||||
{
|
||||
$returnType = '';
|
||||
$request = $this->testCodeInjectEndRnNRRequest($unknown_base_type);
|
||||
|
||||
return $this->client
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
return [null, $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 'testCodeInjectEndRnNR'
|
||||
*
|
||||
* @param object $unknown_base_type (optional)
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Psr7\Request
|
||||
*/
|
||||
protected function testCodeInjectEndRnNRRequest($unknown_base_type = null)
|
||||
{
|
||||
|
||||
$resourcePath = '/fake';
|
||||
$formParams = [];
|
||||
$queryParams = [];
|
||||
$headerParams = [];
|
||||
$httpBody = '';
|
||||
$multipart = false;
|
||||
|
||||
|
||||
|
||||
// body params
|
||||
$_tempBody = null;
|
||||
if (isset($unknown_base_type)) {
|
||||
$_tempBody = $unknown_base_type;
|
||||
}
|
||||
|
||||
if ($multipart) {
|
||||
$headers = $this->headerSelector->selectHeadersForMultipart(
|
||||
[]
|
||||
);
|
||||
} else {
|
||||
$headers = $this->headerSelector->selectHeaders(
|
||||
[],
|
||||
['application/json', '*_/ \" =end --']
|
||||
);
|
||||
}
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
// $_tempBody is the method argument, if present
|
||||
$httpBody = $_tempBody;
|
||||
// \stdClass has no __toString(), so we should encode it manually
|
||||
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
|
||||
$httpBody = \GuzzleHttp\json_encode($httpBody);
|
||||
}
|
||||
} 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(
|
||||
'PUT',
|
||||
$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;
|
||||
}
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
<?php
|
||||
/**
|
||||
* ApiException
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end --
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.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;
|
||||
|
||||
use \Exception;
|
||||
|
||||
/**
|
||||
* ApiException Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class ApiException extends Exception
|
||||
{
|
||||
|
||||
/**
|
||||
* The HTTP body of the server response either as Json or string.
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
protected $responseBody;
|
||||
|
||||
/**
|
||||
* The HTTP header of the server response.
|
||||
*
|
||||
* @var string[]|null
|
||||
*/
|
||||
protected $responseHeaders;
|
||||
|
||||
/**
|
||||
* The deserialized response object
|
||||
*
|
||||
* @var $responseObject;
|
||||
*/
|
||||
protected $responseObject;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $message Error message
|
||||
* @param int $code HTTP status code
|
||||
* @param string[]|null $responseHeaders HTTP response header
|
||||
* @param mixed $responseBody HTTP decoded body of the server response either as \stdClass or string
|
||||
*/
|
||||
public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null)
|
||||
{
|
||||
parent::__construct($message, $code);
|
||||
$this->responseHeaders = $responseHeaders;
|
||||
$this->responseBody = $responseBody;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the HTTP response header
|
||||
*
|
||||
* @return string[]|null HTTP response header
|
||||
*/
|
||||
public function getResponseHeaders()
|
||||
{
|
||||
return $this->responseHeaders;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
public function getResponseBody()
|
||||
{
|
||||
return $this->responseBody;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the deseralized response object (during deserialization)
|
||||
*
|
||||
* @param mixed $obj Deserialized response object
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setResponseObject($obj)
|
||||
{
|
||||
$this->responseObject = $obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the deseralized response object (during deserialization)
|
||||
*
|
||||
* @return mixed the deserialized response object
|
||||
*/
|
||||
public function getResponseObject()
|
||||
{
|
||||
return $this->responseObject;
|
||||
}
|
||||
}
|
@ -0,0 +1,429 @@
|
||||
<?php
|
||||
/**
|
||||
* Configuration
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end --
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.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;
|
||||
|
||||
/**
|
||||
* Configuration Class Doc Comment
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class Configuration
|
||||
{
|
||||
private static $defaultConfiguration;
|
||||
|
||||
/**
|
||||
* Associate array to store API key(s)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $apiKeys = [];
|
||||
|
||||
/**
|
||||
* Associate array to store API prefix (e.g. Bearer)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected $apiKeyPrefixes = [];
|
||||
|
||||
/**
|
||||
* Access token for OAuth
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $accessToken = '';
|
||||
|
||||
/**
|
||||
* Username for HTTP basic authentication
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $username = '';
|
||||
|
||||
/**
|
||||
* Password for HTTP basic authentication
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $password = '';
|
||||
|
||||
/**
|
||||
* The host
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $host = 'petstore.swagger.io *_/ ' \" =end -- \\r\\n \\n \\r/v2 *_/ ' \" =end -- \\r\\n \\n \\r';
|
||||
|
||||
/**
|
||||
* User agent of the HTTP request, set to "OpenAPI-Generator/{version}/PHP" by default
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $userAgent = 'OpenAPI-Generator/1.0.0/PHP';
|
||||
|
||||
/**
|
||||
* Debug switch (default set to false)
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $debug = false;
|
||||
|
||||
/**
|
||||
* Debug file location (log to STDOUT by default)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $debugFile = 'php://output';
|
||||
|
||||
/**
|
||||
* Debug file location (log to STDOUT by default)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $tempFolderPath;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->tempFolderPath = sys_get_temp_dir();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets API key
|
||||
*
|
||||
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
|
||||
* @param string $key API key or token
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setApiKey($apiKeyIdentifier, $key)
|
||||
{
|
||||
$this->apiKeys[$apiKeyIdentifier] = $key;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets API key
|
||||
*
|
||||
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
|
||||
*
|
||||
* @return string API key or token
|
||||
*/
|
||||
public function getApiKey($apiKeyIdentifier)
|
||||
{
|
||||
return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the prefix for API key (e.g. Bearer)
|
||||
*
|
||||
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
|
||||
* @param string $prefix API key prefix, e.g. Bearer
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setApiKeyPrefix($apiKeyIdentifier, $prefix)
|
||||
{
|
||||
$this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets API key prefix
|
||||
*
|
||||
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getApiKeyPrefix($apiKeyIdentifier)
|
||||
{
|
||||
return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the access token for OAuth
|
||||
*
|
||||
* @param string $accessToken Token for OAuth
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setAccessToken($accessToken)
|
||||
{
|
||||
$this->accessToken = $accessToken;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the access token for OAuth
|
||||
*
|
||||
* @return string Access token for OAuth
|
||||
*/
|
||||
public function getAccessToken()
|
||||
{
|
||||
return $this->accessToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the username for HTTP basic authentication
|
||||
*
|
||||
* @param string $username Username for HTTP basic authentication
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setUsername($username)
|
||||
{
|
||||
$this->username = $username;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the username for HTTP basic authentication
|
||||
*
|
||||
* @return string Username for HTTP basic authentication
|
||||
*/
|
||||
public function getUsername()
|
||||
{
|
||||
return $this->username;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the password for HTTP basic authentication
|
||||
*
|
||||
* @param string $password Password for HTTP basic authentication
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setPassword($password)
|
||||
{
|
||||
$this->password = $password;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the password for HTTP basic authentication
|
||||
*
|
||||
* @return string Password for HTTP basic authentication
|
||||
*/
|
||||
public function getPassword()
|
||||
{
|
||||
return $this->password;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the host
|
||||
*
|
||||
* @param string $host Host
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setHost($host)
|
||||
{
|
||||
$this->host = $host;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the host
|
||||
*
|
||||
* @return string Host
|
||||
*/
|
||||
public function getHost()
|
||||
{
|
||||
return $this->host;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the user agent of the api client
|
||||
*
|
||||
* @param string $userAgent the user agent of the api client
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return $this
|
||||
*/
|
||||
public function setUserAgent($userAgent)
|
||||
{
|
||||
if (!is_string($userAgent)) {
|
||||
throw new \InvalidArgumentException('User-agent must be a string.');
|
||||
}
|
||||
|
||||
$this->userAgent = $userAgent;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the user agent of the api client
|
||||
*
|
||||
* @return string user agent
|
||||
*/
|
||||
public function getUserAgent()
|
||||
{
|
||||
return $this->userAgent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets debug flag
|
||||
*
|
||||
* @param bool $debug Debug flag
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDebug($debug)
|
||||
{
|
||||
$this->debug = $debug;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the debug flag
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getDebug()
|
||||
{
|
||||
return $this->debug;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the debug file
|
||||
*
|
||||
* @param string $debugFile Debug file
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setDebugFile($debugFile)
|
||||
{
|
||||
$this->debugFile = $debugFile;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the debug file
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDebugFile()
|
||||
{
|
||||
return $this->debugFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the temp folder path
|
||||
*
|
||||
* @param string $tempFolderPath Temp folder path
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTempFolderPath($tempFolderPath)
|
||||
{
|
||||
$this->tempFolderPath = $tempFolderPath;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the temp folder path
|
||||
*
|
||||
* @return string Temp folder path
|
||||
*/
|
||||
public function getTempFolderPath()
|
||||
{
|
||||
return $this->tempFolderPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default configuration instance
|
||||
*
|
||||
* @return Configuration
|
||||
*/
|
||||
public static function getDefaultConfiguration()
|
||||
{
|
||||
if (self::$defaultConfiguration === null) {
|
||||
self::$defaultConfiguration = new Configuration();
|
||||
}
|
||||
|
||||
return self::$defaultConfiguration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the detault configuration instance
|
||||
*
|
||||
* @param Configuration $config An instance of the Configuration Object
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function setDefaultConfiguration(Configuration $config)
|
||||
{
|
||||
self::$defaultConfiguration = $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the essential information for debugging
|
||||
*
|
||||
* @return string The report for debugging
|
||||
*/
|
||||
public static function toDebugReport()
|
||||
{
|
||||
$report = 'PHP SDK (OpenAPI\Client) Debug Report:' . PHP_EOL;
|
||||
$report .= ' OS: ' . php_uname() . PHP_EOL;
|
||||
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
|
||||
$report .= ' OpenAPI Spec Version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r' . PHP_EOL;
|
||||
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
|
||||
|
||||
return $report;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get API key (with prefix if set)
|
||||
*
|
||||
* @param string $apiKeyIdentifier name of apikey
|
||||
*
|
||||
* @return string API key with the prefix
|
||||
*/
|
||||
public function getApiKeyWithPrefix($apiKeyIdentifier)
|
||||
{
|
||||
$prefix = $this->getApiKeyPrefix($apiKeyIdentifier);
|
||||
$apiKey = $this->getApiKey($apiKeyIdentifier);
|
||||
|
||||
if ($apiKey === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($prefix === null) {
|
||||
$keyWithPrefix = $apiKey;
|
||||
} else {
|
||||
$keyWithPrefix = $prefix . ' ' . $apiKey;
|
||||
}
|
||||
|
||||
return $keyWithPrefix;
|
||||
}
|
||||
}
|
@ -0,0 +1,110 @@
|
||||
<?php
|
||||
/**
|
||||
* ApiException
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end --
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.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;
|
||||
|
||||
use \Exception;
|
||||
|
||||
/**
|
||||
* ApiException Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class HeaderSelector
|
||||
{
|
||||
|
||||
/**
|
||||
* @param string[] $accept
|
||||
* @param string[] $contentTypes
|
||||
* @return array
|
||||
*/
|
||||
public function selectHeaders($accept, $contentTypes)
|
||||
{
|
||||
$headers = [];
|
||||
|
||||
$accept = $this->selectAcceptHeader($accept);
|
||||
if ($accept !== null) {
|
||||
$headers['Accept'] = $accept;
|
||||
}
|
||||
|
||||
$headers['Content-Type'] = $this->selectContentTypeHeader($contentTypes);
|
||||
return $headers;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string[] $accept
|
||||
* @return array
|
||||
*/
|
||||
public function selectHeadersForMultipart($accept)
|
||||
{
|
||||
$headers = $this->selectHeaders($accept, []);
|
||||
|
||||
unset($headers['Content-Type']);
|
||||
return $headers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the header 'Accept' based on an array of Accept provided
|
||||
*
|
||||
* @param string[] $accept Array of header
|
||||
*
|
||||
* @return string Accept (e.g. application/json)
|
||||
*/
|
||||
private function selectAcceptHeader($accept)
|
||||
{
|
||||
if (count($accept) === 0 || (count($accept) === 1 && $accept[0] === '')) {
|
||||
return null;
|
||||
} elseif (preg_grep("/application\/json/i", $accept)) {
|
||||
return 'application/json';
|
||||
} else {
|
||||
return implode(',', $accept);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the content type based on an array of content-type provided
|
||||
*
|
||||
* @param string[] $contentType Array fo content-type
|
||||
*
|
||||
* @return string Content-Type (e.g. application/json)
|
||||
*/
|
||||
private function selectContentTypeHeader($contentType)
|
||||
{
|
||||
if (count($contentType) === 0 || (count($contentType) === 1 && $contentType[0] === '')) {
|
||||
return 'application/json';
|
||||
} elseif (preg_grep("/application\/json/i", $contentType)) {
|
||||
return 'application/json';
|
||||
} else {
|
||||
return implode(',', $contentType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,96 @@
|
||||
<?php
|
||||
/**
|
||||
* ModelInterface
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client\Model
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end --
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.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;
|
||||
|
||||
/**
|
||||
* Interface abstracting model access.
|
||||
*
|
||||
* @package OpenAPI\Client\Model
|
||||
* @author OpenAPI Generator team
|
||||
*/
|
||||
interface ModelInterface
|
||||
{
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName();
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes();
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats();
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name, and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap();
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters();
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters();
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function listInvalidProperties();
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function valid();
|
||||
}
|
@ -0,0 +1,302 @@
|
||||
<?php
|
||||
/**
|
||||
* ModelReturn
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end --
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.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;
|
||||
|
||||
/**
|
||||
* ModelReturn Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Model for testing reserved words *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class ModelReturn implements ModelInterface, ArrayAccess
|
||||
{
|
||||
const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'Return';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'return' => 'int'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'return' => 'int32'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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 = [
|
||||
'return' => 'return'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'return' => 'setReturn'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'return' => 'getReturn'
|
||||
];
|
||||
|
||||
/**
|
||||
* 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['return'] = isset($data['return']) ? $data['return'] : 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 return
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function getReturn()
|
||||
{
|
||||
return $this->container['return'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets return
|
||||
*
|
||||
* @param int|null $return property description *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setReturn($return)
|
||||
{
|
||||
$this->container['return'] = $return;
|
||||
|
||||
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()
|
||||
{
|
||||
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,317 @@
|
||||
<?php
|
||||
/**
|
||||
* ObjectSerializer
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OpenAPI Petstore *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ *_/ ' \" =end --
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Contact: something@something.abc *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* OpenAPI Generator version: 3.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;
|
||||
|
||||
/**
|
||||
* ObjectSerializer Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class ObjectSerializer
|
||||
{
|
||||
/**
|
||||
* Serialize data
|
||||
*
|
||||
* @param mixed $data the data to serialize
|
||||
* @param string $type the OpenAPIToolsType of the data
|
||||
* @param string $format the format of the OpenAPITools type of the data
|
||||
*
|
||||
* @return string|object serialized form of $data
|
||||
*/
|
||||
public static function sanitizeForSerialization($data, $type = null, $format = null)
|
||||
{
|
||||
if (is_scalar($data) || null === $data) {
|
||||
return $data;
|
||||
} elseif ($data instanceof \DateTime) {
|
||||
return ($format === 'date') ? $data->format('Y-m-d') : $data->format(\DateTime::ATOM);
|
||||
} elseif (is_array($data)) {
|
||||
foreach ($data as $property => $value) {
|
||||
$data[$property] = self::sanitizeForSerialization($value);
|
||||
}
|
||||
return $data;
|
||||
} elseif (is_object($data)) {
|
||||
$values = [];
|
||||
$formats = $data::openAPIFormats();
|
||||
foreach ($data::openAPITypes() as $property => $openAPIType) {
|
||||
$getter = $data::getters()[$property];
|
||||
$value = $data->$getter();
|
||||
if ($value !== null
|
||||
&& !in_array($openAPIType, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)
|
||||
&& method_exists($openAPIType, 'getAllowableEnumValues')
|
||||
&& !in_array($value, $openAPIType::getAllowableEnumValues())) {
|
||||
$imploded = implode("', '", $openAPIType::getAllowableEnumValues());
|
||||
throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'");
|
||||
}
|
||||
if ($value !== null) {
|
||||
$values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]);
|
||||
}
|
||||
}
|
||||
return (object)$values;
|
||||
} else {
|
||||
return (string)$data;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitize filename by removing path.
|
||||
* e.g. ../../sun.gif becomes sun.gif
|
||||
*
|
||||
* @param string $filename filename to be sanitized
|
||||
*
|
||||
* @return string the sanitized filename
|
||||
*/
|
||||
public static function sanitizeFilename($filename)
|
||||
{
|
||||
if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) {
|
||||
return $match[1];
|
||||
} else {
|
||||
return $filename;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Take value and turn it into a string suitable for inclusion in
|
||||
* the path, by url-encoding.
|
||||
*
|
||||
* @param string $value a string which will be part of the path
|
||||
*
|
||||
* @return string the serialized object
|
||||
*/
|
||||
public static function toPathValue($value)
|
||||
{
|
||||
return rawurlencode(self::toString($value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Take value and turn it into a string suitable for inclusion in
|
||||
* the query, by imploding comma-separated if it's an object.
|
||||
* If it's a string, pass through unchanged. It will be url-encoded
|
||||
* later.
|
||||
*
|
||||
* @param string[]|string|\DateTime $object an object to be serialized to a string
|
||||
*
|
||||
* @return string the serialized object
|
||||
*/
|
||||
public static function toQueryValue($object)
|
||||
{
|
||||
if (is_array($object)) {
|
||||
return implode(',', $object);
|
||||
} else {
|
||||
return self::toString($object);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Take value and turn it into a string suitable for inclusion in
|
||||
* the header. If it's a string, pass through unchanged
|
||||
* If it's a datetime object, format it in ISO8601
|
||||
*
|
||||
* @param string $value a string which will be part of the header
|
||||
*
|
||||
* @return string the header string
|
||||
*/
|
||||
public static function toHeaderValue($value)
|
||||
{
|
||||
return self::toString($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Take value and turn it into a string suitable for inclusion in
|
||||
* the http body (form parameter). If it's a string, pass through unchanged
|
||||
* If it's a datetime object, format it in ISO8601
|
||||
*
|
||||
* @param string|\SplFileObject $value the value of the form parameter
|
||||
*
|
||||
* @return string the form string
|
||||
*/
|
||||
public static function toFormValue($value)
|
||||
{
|
||||
if ($value instanceof \SplFileObject) {
|
||||
return $value->getRealPath();
|
||||
} else {
|
||||
return self::toString($value);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Take value and turn it into a string suitable for inclusion in
|
||||
* the parameter. If it's a string, pass through unchanged
|
||||
* If it's a datetime object, format it in ISO8601
|
||||
*
|
||||
* @param string|\DateTime $value the value of the parameter
|
||||
*
|
||||
* @return string the header string
|
||||
*/
|
||||
public static function toString($value)
|
||||
{
|
||||
if ($value instanceof \DateTime) { // datetime in ISO8601 format
|
||||
return $value->format(\DateTime::ATOM);
|
||||
} else {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Serialize an array to a string.
|
||||
*
|
||||
* @param array $collection collection to serialize to a string
|
||||
* @param string $collectionFormat the format use for serialization (csv,
|
||||
* ssv, tsv, pipes, multi)
|
||||
* @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function serializeCollection(array $collection, $collectionFormat, $allowCollectionFormatMulti = false)
|
||||
{
|
||||
if ($allowCollectionFormatMulti && ('multi' === $collectionFormat)) {
|
||||
// http_build_query() almost does the job for us. We just
|
||||
// need to fix the result of multidimensional arrays.
|
||||
return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&'));
|
||||
}
|
||||
switch ($collectionFormat) {
|
||||
case 'pipes':
|
||||
return implode('|', $collection);
|
||||
|
||||
case 'tsv':
|
||||
return implode("\t", $collection);
|
||||
|
||||
case 'ssv':
|
||||
return implode(' ', $collection);
|
||||
|
||||
case 'csv':
|
||||
// Deliberate fall through. CSV is default format.
|
||||
default:
|
||||
return implode(',', $collection);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deserialize a JSON string into an object
|
||||
*
|
||||
* @param mixed $data object or primitive to be deserialized
|
||||
* @param string $class class name is passed as a string
|
||||
* @param string[] $httpHeaders HTTP headers
|
||||
* @param string $discriminator discriminator if polymorphism is used
|
||||
*
|
||||
* @return object|array|null an single or an array of $class instances
|
||||
*/
|
||||
public static function deserialize($data, $class, $httpHeaders = null)
|
||||
{
|
||||
if (null === $data) {
|
||||
return null;
|
||||
} elseif (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int]
|
||||
$inner = substr($class, 4, -1);
|
||||
$deserialized = [];
|
||||
if (strrpos($inner, ",") !== false) {
|
||||
$subClass_array = explode(',', $inner, 2);
|
||||
$subClass = $subClass_array[1];
|
||||
foreach ($data as $key => $value) {
|
||||
$deserialized[$key] = self::deserialize($value, $subClass, null);
|
||||
}
|
||||
}
|
||||
return $deserialized;
|
||||
} elseif (strcasecmp(substr($class, -2), '[]') === 0) {
|
||||
$subClass = substr($class, 0, -2);
|
||||
$values = [];
|
||||
foreach ($data as $key => $value) {
|
||||
$values[] = self::deserialize($value, $subClass, null);
|
||||
}
|
||||
return $values;
|
||||
} elseif ($class === 'object') {
|
||||
settype($data, 'array');
|
||||
return $data;
|
||||
} elseif ($class === '\DateTime') {
|
||||
// Some API's return an invalid, empty string as a
|
||||
// date-time property. DateTime::__construct() will return
|
||||
// the current time for empty input which is probably not
|
||||
// what is meant. The invalid empty string is probably to
|
||||
// be interpreted as a missing field/value. Let's handle
|
||||
// this graceful.
|
||||
if (!empty($data)) {
|
||||
return new \DateTime($data);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} elseif (in_array($class, ['DateTime', 'bool', 'boolean', 'byte', 'double', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) {
|
||||
settype($data, $class);
|
||||
return $data;
|
||||
} elseif ($class === '\SplFileObject') {
|
||||
/** @var \Psr\Http\Message\StreamInterface $data */
|
||||
|
||||
// determine file name
|
||||
if (array_key_exists('Content-Disposition', $httpHeaders) &&
|
||||
preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) {
|
||||
$filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]);
|
||||
} else {
|
||||
$filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), '');
|
||||
}
|
||||
|
||||
$file = fopen($filename, 'w');
|
||||
while ($chunk = $data->read(200)) {
|
||||
fwrite($file, $chunk);
|
||||
}
|
||||
fclose($file);
|
||||
|
||||
return new \SplFileObject($filename, 'r');
|
||||
} elseif (method_exists($class, 'getAllowableEnumValues')) {
|
||||
if (!in_array($data, $class::getAllowableEnumValues())) {
|
||||
$imploded = implode("', '", $class::getAllowableEnumValues());
|
||||
throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'");
|
||||
}
|
||||
return $data;
|
||||
} else {
|
||||
// If a discriminator is defined and points to a valid subclass, use it.
|
||||
$discriminator = $class::DISCRIMINATOR;
|
||||
if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) {
|
||||
$subclass = '\OpenAPI\Client\Model\\' . $data->{$discriminator};
|
||||
if (is_subclass_of($subclass, $class)) {
|
||||
$class = $subclass;
|
||||
}
|
||||
}
|
||||
$instance = new $class();
|
||||
foreach ($instance::openAPITypes() as $property => $type) {
|
||||
$propertySetter = $instance::setters()[$property];
|
||||
|
||||
if (!isset($propertySetter) || !isset($data->{$instance::attributeMap()[$property]})) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$propertyValue = $data->{$instance::attributeMap()[$property]};
|
||||
if (isset($propertyValue)) {
|
||||
$instance->$propertySetter(self::deserialize($propertyValue, $type, null));
|
||||
}
|
||||
}
|
||||
return $instance;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit bootstrap="./vendor/autoload.php"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
stopOnFailure="false">
|
||||
<testsuites>
|
||||
<testsuite>
|
||||
<directory>./test/Api</directory>
|
||||
<directory>./test/Model</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<filter>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">./lib/Api</directory>
|
||||
<directory suffix=".php">./lib/Model</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
@ -4,7 +4,7 @@
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPITools\Client
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
@ -26,17 +26,17 @@
|
||||
* Please update the test case below to test the endpoint.
|
||||
*/
|
||||
|
||||
namespace OpenAPITools\Client;
|
||||
namespace OpenAPI\Client;
|
||||
|
||||
use \OpenAPITools\Client\Configuration;
|
||||
use \OpenAPITools\Client\ApiException;
|
||||
use \OpenAPITools\Client\ObjectSerializer;
|
||||
use \OpenAPI\Client\Configuration;
|
||||
use \OpenAPI\Client\ApiException;
|
||||
use \OpenAPI\Client\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* FakeApiTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPITools\Client
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
@ -5,7 +5,7 @@
|
||||
* PHP version 5
|
||||
*
|
||||
* @category Class
|
||||
* @package OpenAPITools\Client
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
@ -27,14 +27,14 @@
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OpenAPITools\Client;
|
||||
namespace OpenAPI\Client;
|
||||
|
||||
/**
|
||||
* ModelReturnTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description Model for testing reserved words *_/ ' \" =end -- \\r\\n \\n \\r
|
||||
* @package OpenAPITools\Client
|
||||
* @package OpenAPI\Client
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
@ -213,7 +213,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets map_property
|
||||
*
|
||||
* @return map[string,string]
|
||||
* @return map[string,string]|null
|
||||
*/
|
||||
public function getMapProperty()
|
||||
{
|
||||
@ -223,7 +223,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets map_property
|
||||
*
|
||||
* @param map[string,string] $map_property map_property
|
||||
* @param map[string,string]|null $map_property map_property
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -237,7 +237,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets map_of_map_property
|
||||
*
|
||||
* @return map[string,map[string,string]]
|
||||
* @return map[string,map[string,string]]|null
|
||||
*/
|
||||
public function getMapOfMapProperty()
|
||||
{
|
||||
@ -247,7 +247,7 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets map_of_map_property
|
||||
*
|
||||
* @param map[string,map[string,string]] $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
|
||||
*/
|
||||
|
@ -244,7 +244,7 @@ class Animal implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets color
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getColor()
|
||||
{
|
||||
@ -254,7 +254,7 @@ class Animal implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets color
|
||||
*
|
||||
* @param string $color color
|
||||
* @param string|null $color color
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -219,7 +219,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets code
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
@ -229,7 +229,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets code
|
||||
*
|
||||
* @param int $code code
|
||||
* @param int|null $code code
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -243,7 +243,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets type
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getType()
|
||||
{
|
||||
@ -253,7 +253,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets type
|
||||
*
|
||||
* @param string $type type
|
||||
* @param string|null $type type
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -267,7 +267,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets message
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
@ -277,7 +277,7 @@ class ApiResponse implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets message
|
||||
*
|
||||
* @param string $message message
|
||||
* @param string|null $message message
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -207,7 +207,7 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets array_array_number
|
||||
*
|
||||
* @return float[][]
|
||||
* @return float[][]|null
|
||||
*/
|
||||
public function getArrayArrayNumber()
|
||||
{
|
||||
@ -217,7 +217,7 @@ class ArrayOfArrayOfNumberOnly implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets array_array_number
|
||||
*
|
||||
* @param float[][] $array_array_number array_array_number
|
||||
* @param float[][]|null $array_array_number array_array_number
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -207,7 +207,7 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets array_number
|
||||
*
|
||||
* @return float[]
|
||||
* @return float[]|null
|
||||
*/
|
||||
public function getArrayNumber()
|
||||
{
|
||||
@ -217,7 +217,7 @@ class ArrayOfNumberOnly implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets array_number
|
||||
*
|
||||
* @param float[] $array_number array_number
|
||||
* @param float[]|null $array_number array_number
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -219,7 +219,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets array_of_string
|
||||
*
|
||||
* @return string[]
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getArrayOfString()
|
||||
{
|
||||
@ -229,7 +229,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets array_of_string
|
||||
*
|
||||
* @param string[] $array_of_string array_of_string
|
||||
* @param string[]|null $array_of_string array_of_string
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -243,7 +243,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets array_array_of_integer
|
||||
*
|
||||
* @return int[][]
|
||||
* @return int[][]|null
|
||||
*/
|
||||
public function getArrayArrayOfInteger()
|
||||
{
|
||||
@ -253,7 +253,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets array_array_of_integer
|
||||
*
|
||||
* @param int[][] $array_array_of_integer array_array_of_integer
|
||||
* @param int[][]|null $array_array_of_integer array_array_of_integer
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -267,7 +267,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets array_array_of_model
|
||||
*
|
||||
* @return \OpenAPI\Client\Model\ReadOnlyFirst[][]
|
||||
* @return \OpenAPI\Client\Model\ReadOnlyFirst[][]|null
|
||||
*/
|
||||
public function getArrayArrayOfModel()
|
||||
{
|
||||
@ -277,7 +277,7 @@ class ArrayTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets array_array_of_model
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\ReadOnlyFirst[][] $array_array_of_model array_array_of_model
|
||||
* @param \OpenAPI\Client\Model\ReadOnlyFirst[][]|null $array_array_of_model array_array_of_model
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -237,7 +237,7 @@ class Capitalization implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets small_camel
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getSmallCamel()
|
||||
{
|
||||
@ -247,7 +247,7 @@ class Capitalization implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets small_camel
|
||||
*
|
||||
* @param string $small_camel small_camel
|
||||
* @param string|null $small_camel small_camel
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -261,7 +261,7 @@ class Capitalization implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets capital_camel
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getCapitalCamel()
|
||||
{
|
||||
@ -271,7 +271,7 @@ class Capitalization implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets capital_camel
|
||||
*
|
||||
* @param string $capital_camel capital_camel
|
||||
* @param string|null $capital_camel capital_camel
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -285,7 +285,7 @@ class Capitalization implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets small_snake
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getSmallSnake()
|
||||
{
|
||||
@ -295,7 +295,7 @@ class Capitalization implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets small_snake
|
||||
*
|
||||
* @param string $small_snake small_snake
|
||||
* @param string|null $small_snake small_snake
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -309,7 +309,7 @@ class Capitalization implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets capital_snake
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getCapitalSnake()
|
||||
{
|
||||
@ -319,7 +319,7 @@ class Capitalization implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets capital_snake
|
||||
*
|
||||
* @param string $capital_snake capital_snake
|
||||
* @param string|null $capital_snake capital_snake
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -333,7 +333,7 @@ class Capitalization implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets sca_eth_flow_points
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getScaEthFlowPoints()
|
||||
{
|
||||
@ -343,7 +343,7 @@ class Capitalization implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets sca_eth_flow_points
|
||||
*
|
||||
* @param string $sca_eth_flow_points sca_eth_flow_points
|
||||
* @param string|null $sca_eth_flow_points sca_eth_flow_points
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -357,7 +357,7 @@ class Capitalization implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets att_name
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getAttName()
|
||||
{
|
||||
@ -367,7 +367,7 @@ class Capitalization implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets att_name
|
||||
*
|
||||
* @param string $att_name Name of the pet
|
||||
* @param string|null $att_name Name of the pet
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -201,7 +201,7 @@ class Cat extends Animal
|
||||
/**
|
||||
* Gets declawed
|
||||
*
|
||||
* @return bool
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getDeclawed()
|
||||
{
|
||||
@ -211,7 +211,7 @@ class Cat extends Animal
|
||||
/**
|
||||
* Sets declawed
|
||||
*
|
||||
* @param bool $declawed declawed
|
||||
* @param bool|null $declawed declawed
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -213,7 +213,7 @@ class Category implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets id
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
@ -223,7 +223,7 @@ class Category implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param int $id id
|
||||
* @param int|null $id id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -237,7 +237,7 @@ class Category implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
@ -247,7 +247,7 @@ class Category implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string $name name
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -208,7 +208,7 @@ class ClassModel implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets _class
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getClass()
|
||||
{
|
||||
@ -218,7 +218,7 @@ class ClassModel implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets _class
|
||||
*
|
||||
* @param string $_class _class
|
||||
* @param string|null $_class _class
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -207,7 +207,7 @@ class Client implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets client
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getClient()
|
||||
{
|
||||
@ -217,7 +217,7 @@ class Client implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets client
|
||||
*
|
||||
* @param string $client client
|
||||
* @param string|null $client client
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -201,7 +201,7 @@ class Dog extends Animal
|
||||
/**
|
||||
* Gets breed
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getBreed()
|
||||
{
|
||||
@ -211,7 +211,7 @@ class Dog extends Animal
|
||||
/**
|
||||
* Sets breed
|
||||
*
|
||||
* @param string $breed breed
|
||||
* @param string|null $breed breed
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -251,7 +251,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets just_symbol
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getJustSymbol()
|
||||
{
|
||||
@ -261,7 +261,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets just_symbol
|
||||
*
|
||||
* @param string $just_symbol just_symbol
|
||||
* @param string|null $just_symbol just_symbol
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -284,7 +284,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets array_enum
|
||||
*
|
||||
* @return string[]
|
||||
* @return string[]|null
|
||||
*/
|
||||
public function getArrayEnum()
|
||||
{
|
||||
@ -294,7 +294,7 @@ class EnumArrays implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets array_enum
|
||||
*
|
||||
* @param string[] $array_enum array_enum
|
||||
* @param string[]|null $array_enum array_enum
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -330,7 +330,7 @@ class EnumTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets enum_string
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getEnumString()
|
||||
{
|
||||
@ -340,7 +340,7 @@ class EnumTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets enum_string
|
||||
*
|
||||
* @param string $enum_string enum_string
|
||||
* @param string|null $enum_string enum_string
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -396,7 +396,7 @@ class EnumTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets enum_integer
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getEnumInteger()
|
||||
{
|
||||
@ -406,7 +406,7 @@ class EnumTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets enum_integer
|
||||
*
|
||||
* @param int $enum_integer enum_integer
|
||||
* @param int|null $enum_integer enum_integer
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -429,7 +429,7 @@ class EnumTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets enum_number
|
||||
*
|
||||
* @return double
|
||||
* @return double|null
|
||||
*/
|
||||
public function getEnumNumber()
|
||||
{
|
||||
@ -439,7 +439,7 @@ class EnumTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets enum_number
|
||||
*
|
||||
* @param double $enum_number enum_number
|
||||
* @param double|null $enum_number enum_number
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -462,7 +462,7 @@ class EnumTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets outer_enum
|
||||
*
|
||||
* @return \OpenAPI\Client\Model\OuterEnum
|
||||
* @return \OpenAPI\Client\Model\OuterEnum|null
|
||||
*/
|
||||
public function getOuterEnum()
|
||||
{
|
||||
@ -472,7 +472,7 @@ class EnumTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets outer_enum
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\OuterEnum $outer_enum outer_enum
|
||||
* @param \OpenAPI\Client\Model\OuterEnum|null $outer_enum outer_enum
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -347,7 +347,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets integer
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getInteger()
|
||||
{
|
||||
@ -357,7 +357,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets integer
|
||||
*
|
||||
* @param int $integer integer
|
||||
* @param int|null $integer integer
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -379,7 +379,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets int32
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getInt32()
|
||||
{
|
||||
@ -389,7 +389,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets int32
|
||||
*
|
||||
* @param int $int32 int32
|
||||
* @param int|null $int32 int32
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -411,7 +411,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets int64
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getInt64()
|
||||
{
|
||||
@ -421,7 +421,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets int64
|
||||
*
|
||||
* @param int $int64 int64
|
||||
* @param int|null $int64 int64
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -467,7 +467,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets float
|
||||
*
|
||||
* @return float
|
||||
* @return float|null
|
||||
*/
|
||||
public function getFloat()
|
||||
{
|
||||
@ -477,7 +477,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets float
|
||||
*
|
||||
* @param float $float float
|
||||
* @param float|null $float float
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -499,7 +499,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets double
|
||||
*
|
||||
* @return double
|
||||
* @return double|null
|
||||
*/
|
||||
public function getDouble()
|
||||
{
|
||||
@ -509,7 +509,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets double
|
||||
*
|
||||
* @param double $double double
|
||||
* @param double|null $double double
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -531,7 +531,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets string
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getString()
|
||||
{
|
||||
@ -541,7 +541,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets string
|
||||
*
|
||||
* @param string $string string
|
||||
* @param string|null $string string
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -589,7 +589,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets binary
|
||||
*
|
||||
* @return \SplFileObject
|
||||
* @return \SplFileObject|null
|
||||
*/
|
||||
public function getBinary()
|
||||
{
|
||||
@ -599,7 +599,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets binary
|
||||
*
|
||||
* @param \SplFileObject $binary binary
|
||||
* @param \SplFileObject|null $binary binary
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -637,7 +637,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets date_time
|
||||
*
|
||||
* @return \DateTime
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getDateTime()
|
||||
{
|
||||
@ -647,7 +647,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets date_time
|
||||
*
|
||||
* @param \DateTime $date_time date_time
|
||||
* @param \DateTime|null $date_time date_time
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -661,7 +661,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets uuid
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getUuid()
|
||||
{
|
||||
@ -671,7 +671,7 @@ class FormatTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets uuid
|
||||
*
|
||||
* @param string $uuid uuid
|
||||
* @param string|null $uuid uuid
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -213,7 +213,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets bar
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getBar()
|
||||
{
|
||||
@ -223,7 +223,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets bar
|
||||
*
|
||||
* @param string $bar bar
|
||||
* @param string|null $bar bar
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -237,7 +237,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets foo
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getFoo()
|
||||
{
|
||||
@ -247,7 +247,7 @@ class HasOnlyReadOnly implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets foo
|
||||
*
|
||||
* @param string $foo foo
|
||||
* @param string|null $foo foo
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -228,7 +228,7 @@ class MapTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets map_map_of_string
|
||||
*
|
||||
* @return map[string,map[string,string]]
|
||||
* @return map[string,map[string,string]]|null
|
||||
*/
|
||||
public function getMapMapOfString()
|
||||
{
|
||||
@ -238,7 +238,7 @@ class MapTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets map_map_of_string
|
||||
*
|
||||
* @param map[string,map[string,string]] $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
|
||||
*/
|
||||
@ -252,7 +252,7 @@ class MapTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets map_of_enum_string
|
||||
*
|
||||
* @return map[string,string]
|
||||
* @return map[string,string]|null
|
||||
*/
|
||||
public function getMapOfEnumString()
|
||||
{
|
||||
@ -262,7 +262,7 @@ class MapTest implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets map_of_enum_string
|
||||
*
|
||||
* @param map[string,string] $map_of_enum_string map_of_enum_string
|
||||
* @param map[string,string]|null $map_of_enum_string map_of_enum_string
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -219,7 +219,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
|
||||
/**
|
||||
* Gets uuid
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getUuid()
|
||||
{
|
||||
@ -229,7 +229,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
|
||||
/**
|
||||
* Sets uuid
|
||||
*
|
||||
* @param string $uuid uuid
|
||||
* @param string|null $uuid uuid
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -243,7 +243,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
|
||||
/**
|
||||
* Gets date_time
|
||||
*
|
||||
* @return \DateTime
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getDateTime()
|
||||
{
|
||||
@ -253,7 +253,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
|
||||
/**
|
||||
* Sets date_time
|
||||
*
|
||||
* @param \DateTime $date_time date_time
|
||||
* @param \DateTime|null $date_time date_time
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -267,7 +267,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
|
||||
/**
|
||||
* Gets map
|
||||
*
|
||||
* @return map[string,\OpenAPI\Client\Model\Animal]
|
||||
* @return map[string,\OpenAPI\Client\Model\Animal]|null
|
||||
*/
|
||||
public function getMap()
|
||||
{
|
||||
@ -277,7 +277,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ModelInterface, Arr
|
||||
/**
|
||||
* Sets map
|
||||
*
|
||||
* @param map[string,\OpenAPI\Client\Model\Animal] $map map
|
||||
* @param map[string,\OpenAPI\Client\Model\Animal]|null $map map
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -214,7 +214,7 @@ class Model200Response implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
@ -224,7 +224,7 @@ class Model200Response implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param int $name name
|
||||
* @param int|null $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -238,7 +238,7 @@ class Model200Response implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets class
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getClass()
|
||||
{
|
||||
@ -248,7 +248,7 @@ class Model200Response implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets class
|
||||
*
|
||||
* @param string $class class
|
||||
* @param string|null $class class
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -207,7 +207,7 @@ class ModelList implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets _123_list
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function get123List()
|
||||
{
|
||||
@ -217,7 +217,7 @@ class ModelList implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets _123_list
|
||||
*
|
||||
* @param string $_123_list _123_list
|
||||
* @param string|null $_123_list _123_list
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -208,7 +208,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets return
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getReturn()
|
||||
{
|
||||
@ -218,7 +218,7 @@ class ModelReturn implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets return
|
||||
*
|
||||
* @param int $return return
|
||||
* @param int|null $return return
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -253,7 +253,7 @@ class Name implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets snake_case
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getSnakeCase()
|
||||
{
|
||||
@ -263,7 +263,7 @@ class Name implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets snake_case
|
||||
*
|
||||
* @param int $snake_case snake_case
|
||||
* @param int|null $snake_case snake_case
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -277,7 +277,7 @@ class Name implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets property
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getProperty()
|
||||
{
|
||||
@ -287,7 +287,7 @@ class Name implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets property
|
||||
*
|
||||
* @param string $property property
|
||||
* @param string|null $property property
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -301,7 +301,7 @@ class Name implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets _123_number
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function get123Number()
|
||||
{
|
||||
@ -311,7 +311,7 @@ class Name implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets _123_number
|
||||
*
|
||||
* @param int $_123_number _123_number
|
||||
* @param int|null $_123_number _123_number
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -207,7 +207,7 @@ class NumberOnly implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets just_number
|
||||
*
|
||||
* @return float
|
||||
* @return float|null
|
||||
*/
|
||||
public function getJustNumber()
|
||||
{
|
||||
@ -217,7 +217,7 @@ class NumberOnly implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets just_number
|
||||
*
|
||||
* @param float $just_number just_number
|
||||
* @param float|null $just_number just_number
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -262,7 +262,7 @@ class Order implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets id
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
@ -272,7 +272,7 @@ class Order implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param int $id id
|
||||
* @param int|null $id id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -286,7 +286,7 @@ class Order implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets pet_id
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getPetId()
|
||||
{
|
||||
@ -296,7 +296,7 @@ class Order implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets pet_id
|
||||
*
|
||||
* @param int $pet_id pet_id
|
||||
* @param int|null $pet_id pet_id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -310,7 +310,7 @@ class Order implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets quantity
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getQuantity()
|
||||
{
|
||||
@ -320,7 +320,7 @@ class Order implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets quantity
|
||||
*
|
||||
* @param int $quantity quantity
|
||||
* @param int|null $quantity quantity
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -334,7 +334,7 @@ class Order implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets ship_date
|
||||
*
|
||||
* @return \DateTime
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getShipDate()
|
||||
{
|
||||
@ -344,7 +344,7 @@ class Order implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets ship_date
|
||||
*
|
||||
* @param \DateTime $ship_date ship_date
|
||||
* @param \DateTime|null $ship_date ship_date
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -358,7 +358,7 @@ class Order implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets status
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
@ -368,7 +368,7 @@ class Order implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets status
|
||||
*
|
||||
* @param string $status Order Status
|
||||
* @param string|null $status Order Status
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -391,7 +391,7 @@ class Order implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets complete
|
||||
*
|
||||
* @return bool
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getComplete()
|
||||
{
|
||||
@ -401,7 +401,7 @@ class Order implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets complete
|
||||
*
|
||||
* @param bool $complete complete
|
||||
* @param bool|null $complete complete
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -219,7 +219,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets my_number
|
||||
*
|
||||
* @return float
|
||||
* @return float|null
|
||||
*/
|
||||
public function getMyNumber()
|
||||
{
|
||||
@ -229,7 +229,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets my_number
|
||||
*
|
||||
* @param float $my_number my_number
|
||||
* @param float|null $my_number my_number
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -243,7 +243,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets my_string
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getMyString()
|
||||
{
|
||||
@ -253,7 +253,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets my_string
|
||||
*
|
||||
* @param string $my_string my_string
|
||||
* @param string|null $my_string my_string
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -267,7 +267,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets my_boolean
|
||||
*
|
||||
* @return bool
|
||||
* @return bool|null
|
||||
*/
|
||||
public function getMyBoolean()
|
||||
{
|
||||
@ -277,7 +277,7 @@ class OuterComposite implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets my_boolean
|
||||
*
|
||||
* @param bool $my_boolean my_boolean
|
||||
* @param bool|null $my_boolean my_boolean
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -268,7 +268,7 @@ class Pet implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets id
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
@ -278,7 +278,7 @@ class Pet implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param int $id id
|
||||
* @param int|null $id id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -292,7 +292,7 @@ class Pet implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets category
|
||||
*
|
||||
* @return \OpenAPI\Client\Model\Category
|
||||
* @return \OpenAPI\Client\Model\Category|null
|
||||
*/
|
||||
public function getCategory()
|
||||
{
|
||||
@ -302,7 +302,7 @@ class Pet implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets category
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\Category $category category
|
||||
* @param \OpenAPI\Client\Model\Category|null $category category
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -364,7 +364,7 @@ class Pet implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets tags
|
||||
*
|
||||
* @return \OpenAPI\Client\Model\Tag[]
|
||||
* @return \OpenAPI\Client\Model\Tag[]|null
|
||||
*/
|
||||
public function getTags()
|
||||
{
|
||||
@ -374,7 +374,7 @@ class Pet implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets tags
|
||||
*
|
||||
* @param \OpenAPI\Client\Model\Tag[] $tags tags
|
||||
* @param \OpenAPI\Client\Model\Tag[]|null $tags tags
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -388,7 +388,7 @@ class Pet implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets status
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getStatus()
|
||||
{
|
||||
@ -398,7 +398,7 @@ class Pet implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets status
|
||||
*
|
||||
* @param string $status pet status in the store
|
||||
* @param string|null $status pet status in the store
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -213,7 +213,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets bar
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getBar()
|
||||
{
|
||||
@ -223,7 +223,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets bar
|
||||
*
|
||||
* @param string $bar bar
|
||||
* @param string|null $bar bar
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -237,7 +237,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets baz
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getBaz()
|
||||
{
|
||||
@ -247,7 +247,7 @@ class ReadOnlyFirst implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets baz
|
||||
*
|
||||
* @param string $baz baz
|
||||
* @param string|null $baz baz
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -207,7 +207,7 @@ class SpecialModelName implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets special_property_name
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getSpecialPropertyName()
|
||||
{
|
||||
@ -217,7 +217,7 @@ class SpecialModelName implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets special_property_name
|
||||
*
|
||||
* @param int $special_property_name special_property_name
|
||||
* @param int|null $special_property_name special_property_name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -213,7 +213,7 @@ class Tag implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets id
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
@ -223,7 +223,7 @@ class Tag implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param int $id id
|
||||
* @param int|null $id id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -237,7 +237,7 @@ class Tag implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
@ -247,7 +247,7 @@ class Tag implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string $name name
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -249,7 +249,7 @@ class User implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets id
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
@ -259,7 +259,7 @@ class User implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param int $id id
|
||||
* @param int|null $id id
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -273,7 +273,7 @@ class User implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets username
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getUsername()
|
||||
{
|
||||
@ -283,7 +283,7 @@ class User implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets username
|
||||
*
|
||||
* @param string $username username
|
||||
* @param string|null $username username
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -297,7 +297,7 @@ class User implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets first_name
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getFirstName()
|
||||
{
|
||||
@ -307,7 +307,7 @@ class User implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets first_name
|
||||
*
|
||||
* @param string $first_name first_name
|
||||
* @param string|null $first_name first_name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -321,7 +321,7 @@ class User implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets last_name
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getLastName()
|
||||
{
|
||||
@ -331,7 +331,7 @@ class User implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets last_name
|
||||
*
|
||||
* @param string $last_name last_name
|
||||
* @param string|null $last_name last_name
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -345,7 +345,7 @@ class User implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets email
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getEmail()
|
||||
{
|
||||
@ -355,7 +355,7 @@ class User implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets email
|
||||
*
|
||||
* @param string $email email
|
||||
* @param string|null $email email
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -369,7 +369,7 @@ class User implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets password
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getPassword()
|
||||
{
|
||||
@ -379,7 +379,7 @@ class User implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets password
|
||||
*
|
||||
* @param string $password password
|
||||
* @param string|null $password password
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -393,7 +393,7 @@ class User implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets phone
|
||||
*
|
||||
* @return string
|
||||
* @return string|null
|
||||
*/
|
||||
public function getPhone()
|
||||
{
|
||||
@ -403,7 +403,7 @@ class User implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets phone
|
||||
*
|
||||
* @param string $phone phone
|
||||
* @param string|null $phone phone
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@ -417,7 +417,7 @@ class User implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Gets user_status
|
||||
*
|
||||
* @return int
|
||||
* @return int|null
|
||||
*/
|
||||
public function getUserStatus()
|
||||
{
|
||||
@ -427,7 +427,7 @@ class User implements ModelInterface, ArrayAccess
|
||||
/**
|
||||
* Sets user_status
|
||||
*
|
||||
* @param int $user_status User Status
|
||||
* @param int|null $user_status User Status
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user