Merge pull request #2465 from wing328/php_improvement

[PHP] minor php code improvement
This commit is contained in:
wing328 2016-04-09 18:18:18 +08:00
commit 50bbd9818c
32 changed files with 266 additions and 529 deletions

View File

@ -259,7 +259,7 @@ class ApiClient
*
* @return string Accept (e.g. application/json)
*/
public static function selectHeaderAccept($accept)
public function selectHeaderAccept($accept)
{
if (count($accept) === 0 or (count($accept) === 1 and $accept[0] === '')) {
return null;
@ -277,7 +277,7 @@ class ApiClient
*
* @return string Content-Type (e.g. application/json)
*/
public static function selectHeaderContentType($content_type)
public function selectHeaderContentType($content_type)
{
if (count($content_type) === 0 or (count($content_type) === 1 and $content_type[0] === '')) {
return 'application/json';
@ -299,9 +299,9 @@ class ApiClient
{
// ref/credit: http://php.net/manual/en/function.http-parse-headers.php#112986
$headers = array();
$key = ''; // [+]
$key = '';
foreach(explode("\n", $raw_headers) as $i => $h)
foreach(explode("\n", $raw_headers) as $h)
{
$h = explode(':', $h, 2);
@ -311,26 +311,22 @@ class ApiClient
$headers[$h[0]] = trim($h[1]);
elseif (is_array($headers[$h[0]]))
{
// $tmp = array_merge($headers[$h[0]], array(trim($h[1]))); // [-]
// $headers[$h[0]] = $tmp; // [-]
$headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1]))); // [+]
$headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1])));
}
else
{
// $tmp = array_merge(array($headers[$h[0]]), array(trim($h[1]))); // [-]
// $headers[$h[0]] = $tmp; // [-]
$headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1]))); // [+]
$headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1])));
}
$key = $h[0]; // [+]
$key = $h[0];
}
else
{
if (substr($h[0], 0, 1) == "\t")
$headers[$key] .= "\r\n\t".trim($h[0]);
elseif (!$key)
$headers[0] = trim($h[0]);trim($h[0]);
}
else // [+]
{ // [+]
if (substr($h[0], 0, 1) == "\t") // [+]
$headers[$key] .= "\r\n\t".trim($h[0]); // [+]
elseif (!$key) // [+]
$headers[0] = trim($h[0]);trim($h[0]); // [+]
} // [+]
}
return $headers;

View File

@ -55,14 +55,14 @@ class ObjectSerializer
public static function sanitizeForSerialization($data)
{
if (is_scalar($data) || null === $data) {
$sanitized = $data;
return $data;
} elseif ($data instanceof \DateTime) {
$sanitized = $data->format(\DateTime::ATOM);
return $data->format(\DateTime::ATOM);
} elseif (is_array($data)) {
foreach ($data as $property => $value) {
$data[$property] = self::sanitizeForSerialization($value);
}
$sanitized = $data;
return $data;
} elseif (is_object($data)) {
$values = array();
foreach (array_keys($data::swaggerTypes()) as $property) {
@ -71,12 +71,10 @@ class ObjectSerializer
$values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($data->$getter());
}
}
$sanitized = (object)$values;
return (object)$values;
} else {
$sanitized = (string)$data;
return (string)$data;
}
return $sanitized;
}
/**
@ -224,7 +222,7 @@ class ObjectSerializer
public static function deserialize($data, $class, $httpHeaders=null, $discriminator=null)
{
if (null === $data) {
$deserialized = null;
return null;
} elseif (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int]
$inner = substr($class, 4, -1);
$deserialized = array();
@ -235,16 +233,17 @@ class ObjectSerializer
$deserialized[$key] = self::deserialize($value, $subClass, null, $discriminator);
}
}
return $deserialized;
} elseif (strcasecmp(substr($class, -2), '[]') == 0) {
$subClass = substr($class, 0, -2);
$values = array();
foreach ($data as $key => $value) {
$values[] = self::deserialize($value, $subClass, null, $discriminator);
}
$deserialized = $values;
return $values;
} elseif ($class === 'object') {
settype($data, 'array');
$deserialized = $data;
return $data;
} elseif ($class === '\DateTime') {
// Some API's return an invalid, empty string as a
// date-time property. DateTime::__construct() will return
@ -253,13 +252,13 @@ class ObjectSerializer
// be interpreted as a missing field/value. Let's handle
// this graceful.
if (!empty($data)) {
$deserialized = new \DateTime($data);
return new \DateTime($data);
} else {
$deserialized = null;
return null;
}
} elseif (in_array($class, array({{&primitives}}))) {
settype($data, $class);
$deserialized = $data;
return $data;
} elseif ($class === '\SplFileObject') {
// determine file name
if (array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) {
@ -270,7 +269,8 @@ class ObjectSerializer
$deserialized = new \SplFileObject($filename, "w");
$byte_written = $deserialized->fwrite($data);
error_log("[INFO] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.\n", 3, Configuration::getDefaultConfiguration()->getDebugFile());
return $deserialized;
} else {
// If a discriminator is defined and points to a valid subclass, use it.
if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) {
@ -292,9 +292,7 @@ class ObjectSerializer
$instance->$propertySetter(self::deserialize($propertyValue, $type, null, $discriminator));
}
}
$deserialized = $instance;
return $instance;
}
return $deserialized;
}
}

View File

@ -102,7 +102,7 @@ use \{{invokerPackage}}\ObjectSerializer;
*/
public function {{operationId}}({{#allParams}}${{paramName}}{{^required}} = null{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
{
list($response, $statusCode, $httpHeader) = $this->{{operationId}}WithHttpInfo ({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
list($response) = $this->{{operationId}}WithHttpInfo ({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
return $response;
}
@ -130,11 +130,11 @@ use \{{invokerPackage}}\ObjectSerializer;
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array({{#produces}}'{{mediaType}}'{{#hasMore}}, {{/hasMore}}{{/produces}}));
$_header_accept = $this->apiClient->selectHeaderAccept(array({{#produces}}'{{mediaType}}'{{#hasMore}}, {{/hasMore}}{{/produces}}));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array({{#consumes}}'{{mediaType}}'{{#hasMore}},{{/hasMore}}{{/consumes}}));
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array({{#consumes}}'{{mediaType}}'{{#hasMore}},{{/hasMore}}{{/consumes}}));
{{#queryParams}}// query params
{{#collectionFormat}}
@ -223,14 +223,14 @@ use \{{invokerPackage}}\ObjectSerializer;
return array(null, $statusCode, $httpHeader);
}
return array(\{{invokerPackage}}\ObjectSerializer::deserialize($response, '{{returnType}}', $httpHeader{{#discriminator}}, '{{discriminator}}'{{/discriminator}}), $statusCode, $httpHeader);
return array($this->apiClient->getSerializer()->deserialize($response, '{{returnType}}', $httpHeader{{#discriminator}}, '{{discriminator}}'{{/discriminator}}), $statusCode, $httpHeader);
{{/returnType}}{{^returnType}}
return array(null, $statusCode, $httpHeader);
{{/returnType}}
} catch (ApiException $e) {
switch ($e->getCode()) { {{#responses}}{{#dataType}}
{{^isWildcard}}case {{code}}:{{/isWildcard}}{{#isWildcard}}default:{{/isWildcard}}
$data = \{{invokerPackage}}\ObjectSerializer::deserialize($e->getResponseBody(), '{{dataType}}', $e->getResponseHeaders());
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '{{dataType}}', $e->getResponseHeaders());
$e->setResponseObject($data);
break;{{/dataType}}{{/responses}}
}

View File

@ -192,11 +192,11 @@ class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}implements ArrayA
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\{{invokerPackage}}\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\{{invokerPackage}}\ObjectSerializer::sanitizeForSerialization($this));
}
return json_encode(\{{invokerPackage}}\ObjectSerializer::sanitizeForSerialization($this));
}
}
{{/model}}

View File

@ -5,7 +5,7 @@ This PHP package is automatically generated by the [Swagger Codegen](https://git
- API version: 1.0.0
- Package version: 1.0.0
- Build date: 2016-03-30T20:57:56.803+08:00
- Build date: 2016-04-09T18:00:55.578+08:00
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
## Requirements
@ -80,20 +80,20 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
*PetApi* | [**addPetUsingByteArray**](docs/PetApi.md#addpetusingbytearray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
*PetApi* | [**addPetUsingByteArray**](docs/PetApi.md#addpetusingbytearray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
*PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
*PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
*PetApi* | [**getPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
*PetApi* | [**getPetByIdInObject**](docs/PetApi.md#getpetbyidinobject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
*PetApi* | [**petPetIdtestingByteArraytrueGet**](docs/PetApi.md#petpetidtestingbytearraytrueget) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
*PetApi* | [**getPetByIdInObject**](docs/PetApi.md#getpetbyidinobject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
*PetApi* | [**petPetIdtestingByteArraytrueGet**](docs/PetApi.md#petpetidtestingbytearraytrueget) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
*PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
*PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
*StoreApi* | [**findOrdersByStatus**](docs/StoreApi.md#findordersbystatus) | **GET** /store/findByStatus | Finds orders by status
*StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
*StoreApi* | [**getInventoryInObject**](docs/StoreApi.md#getinventoryinobject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
*StoreApi* | [**getInventoryInObject**](docs/StoreApi.md#getinventoryinobject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
*StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID
*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet
*UserApi* | [**createUser**](docs/UserApi.md#createuser) | **POST** /user | Create user

View File

@ -5,13 +5,13 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
[**addPetUsingByteArray**](PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
[**addPetUsingByteArray**](PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
[**getPetByIdInObject**](PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
[**petPetIdtestingByteArraytrueGet**](PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
[**getPetByIdInObject**](PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
[**petPetIdtestingByteArraytrueGet**](PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image

View File

@ -7,7 +7,7 @@ Method | HTTP request | Description
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
[**findOrdersByStatus**](StoreApi.md#findOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
[**getInventoryInObject**](StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
[**getInventoryInObject**](StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by 'Get inventory'
[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet

View File

@ -207,7 +207,7 @@ Get user by user name
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api\UserApi();
$username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing.
$username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing.
try {
$result = $api_instance->getUserByName($username);
@ -222,7 +222,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **string**| The name that needs to be fetched. Use user1 for testing. |
**username** | **string**| The name that needs to be fetched. Use user1 for testing. |
### Return type

View File

@ -90,7 +90,6 @@ class PetApi
return $this;
}
/**
* addPet
*
@ -102,7 +101,7 @@ class PetApi
*/
public function addPet($body = null)
{
list($response, $statusCode, $httpHeader) = $this->addPetWithHttpInfo ($body);
list($response) = $this->addPetWithHttpInfo ($body);
return $response;
}
@ -126,11 +125,11 @@ class PetApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json','application/xml'));
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/xml'));
@ -156,7 +155,6 @@ class PetApi
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -164,9 +162,8 @@ class PetApi
$queryParams, $httpBody,
$headerParams
);
return array(null, $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
}
@ -174,7 +171,6 @@ class PetApi
throw $e;
}
}
/**
* addPetUsingByteArray
*
@ -186,7 +182,7 @@ class PetApi
*/
public function addPetUsingByteArray($body = null)
{
list($response, $statusCode, $httpHeader) = $this->addPetUsingByteArrayWithHttpInfo ($body);
list($response) = $this->addPetUsingByteArrayWithHttpInfo ($body);
return $response;
}
@ -205,16 +201,16 @@ class PetApi
// parse inputs
$resourcePath = "/pet?testing_byte_array=true";
$resourcePath = "/pet?testing_byte_array=true";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json','application/xml'));
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/xml'));
@ -240,7 +236,6 @@ class PetApi
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -248,9 +243,8 @@ class PetApi
$queryParams, $httpBody,
$headerParams
);
return array(null, $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
}
@ -258,7 +252,6 @@ class PetApi
throw $e;
}
}
/**
* deletePet
*
@ -271,7 +264,7 @@ class PetApi
*/
public function deletePet($pet_id, $api_key = null)
{
list($response, $statusCode, $httpHeader) = $this->deletePetWithHttpInfo ($pet_id, $api_key);
list($response) = $this->deletePetWithHttpInfo ($pet_id, $api_key);
return $response;
}
@ -300,20 +293,18 @@ class PetApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
// header params
if ($api_key !== null) {
$headerParams['api_key'] = $this->apiClient->getSerializer()->toHeaderValue($api_key);
}
// path params
if ($pet_id !== null) {
$resourcePath = str_replace(
"{" . "petId" . "}",
@ -338,7 +329,6 @@ class PetApi
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -346,9 +336,8 @@ class PetApi
$queryParams, $httpBody,
$headerParams
);
return array(null, $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
}
@ -356,7 +345,6 @@ class PetApi
throw $e;
}
}
/**
* findPetsByStatus
*
@ -368,7 +356,7 @@ class PetApi
*/
public function findPetsByStatus($status = null)
{
list($response, $statusCode, $httpHeader) = $this->findPetsByStatusWithHttpInfo ($status);
list($response) = $this->findPetsByStatusWithHttpInfo ($status);
return $response;
}
@ -392,18 +380,16 @@ class PetApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
// query params
if (is_array($status)) {
$status = $this->apiClient->getSerializer()->serializeCollection($status, 'multi', true);
}
if ($status !== null) {
$queryParams['status'] = $this->apiClient->getSerializer()->toQueryValue($status);
}
@ -426,7 +412,6 @@ class PetApi
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -434,17 +419,15 @@ class PetApi
$queryParams, $httpBody,
$headerParams, '\Swagger\Client\Model\Pet[]'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\Swagger\Client\ObjectSerializer::deserialize($response, '\Swagger\Client\Model\Pet[]', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
return array($this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Pet[]', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \Swagger\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\Swagger\Client\Model\Pet[]', $e->getResponseHeaders());
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Pet[]', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
@ -452,7 +435,6 @@ class PetApi
throw $e;
}
}
/**
* findPetsByTags
*
@ -464,7 +446,7 @@ class PetApi
*/
public function findPetsByTags($tags = null)
{
list($response, $statusCode, $httpHeader) = $this->findPetsByTagsWithHttpInfo ($tags);
list($response) = $this->findPetsByTagsWithHttpInfo ($tags);
return $response;
}
@ -488,18 +470,16 @@ class PetApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
// query params
if (is_array($tags)) {
$tags = $this->apiClient->getSerializer()->serializeCollection($tags, 'multi', true);
}
if ($tags !== null) {
$queryParams['tags'] = $this->apiClient->getSerializer()->toQueryValue($tags);
}
@ -522,7 +502,6 @@ class PetApi
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -530,17 +509,15 @@ class PetApi
$queryParams, $httpBody,
$headerParams, '\Swagger\Client\Model\Pet[]'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\Swagger\Client\ObjectSerializer::deserialize($response, '\Swagger\Client\Model\Pet[]', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
return array($this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Pet[]', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \Swagger\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\Swagger\Client\Model\Pet[]', $e->getResponseHeaders());
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Pet[]', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
@ -548,7 +525,6 @@ class PetApi
throw $e;
}
}
/**
* getPetById
*
@ -560,7 +536,7 @@ class PetApi
*/
public function getPetById($pet_id)
{
list($response, $statusCode, $httpHeader) = $this->getPetByIdWithHttpInfo ($pet_id);
list($response) = $this->getPetByIdWithHttpInfo ($pet_id);
return $response;
}
@ -588,16 +564,15 @@ class PetApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
// path params
if ($pet_id !== null) {
$resourcePath = str_replace(
"{" . "petId" . "}",
@ -624,12 +599,11 @@ class PetApi
$headerParams['api_key'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -637,17 +611,15 @@ class PetApi
$queryParams, $httpBody,
$headerParams, '\Swagger\Client\Model\Pet'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\Swagger\Client\ObjectSerializer::deserialize($response, '\Swagger\Client\Model\Pet', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
return array($this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Pet', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \Swagger\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\Swagger\Client\Model\Pet', $e->getResponseHeaders());
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Pet', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
@ -655,7 +627,6 @@ class PetApi
throw $e;
}
}
/**
* getPetByIdInObject
*
@ -667,7 +638,7 @@ class PetApi
*/
public function getPetByIdInObject($pet_id)
{
list($response, $statusCode, $httpHeader) = $this->getPetByIdInObjectWithHttpInfo ($pet_id);
list($response) = $this->getPetByIdInObjectWithHttpInfo ($pet_id);
return $response;
}
@ -690,21 +661,20 @@ class PetApi
}
// parse inputs
$resourcePath = "/pet/{petId}?response=inline_arbitrary_object";
$resourcePath = "/pet/{petId}?response=inline_arbitrary_object";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
// path params
if ($pet_id !== null) {
$resourcePath = str_replace(
"{" . "petId" . "}",
@ -731,12 +701,11 @@ class PetApi
$headerParams['api_key'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -744,17 +713,15 @@ class PetApi
$queryParams, $httpBody,
$headerParams, '\Swagger\Client\Model\InlineResponse200'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\Swagger\Client\ObjectSerializer::deserialize($response, '\Swagger\Client\Model\InlineResponse200', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
return array($this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\InlineResponse200', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \Swagger\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\Swagger\Client\Model\InlineResponse200', $e->getResponseHeaders());
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\InlineResponse200', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
@ -762,7 +729,6 @@ class PetApi
throw $e;
}
}
/**
* petPetIdtestingByteArraytrueGet
*
@ -774,7 +740,7 @@ class PetApi
*/
public function petPetIdtestingByteArraytrueGet($pet_id)
{
list($response, $statusCode, $httpHeader) = $this->petPetIdtestingByteArraytrueGetWithHttpInfo ($pet_id);
list($response) = $this->petPetIdtestingByteArraytrueGetWithHttpInfo ($pet_id);
return $response;
}
@ -797,21 +763,20 @@ class PetApi
}
// parse inputs
$resourcePath = "/pet/{petId}?testing_byte_array=true";
$resourcePath = "/pet/{petId}?testing_byte_array=true";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
// path params
if ($pet_id !== null) {
$resourcePath = str_replace(
"{" . "petId" . "}",
@ -838,12 +803,11 @@ class PetApi
$headerParams['api_key'] = $apiKey;
}
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -851,17 +815,15 @@ class PetApi
$queryParams, $httpBody,
$headerParams, 'string'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\Swagger\Client\ObjectSerializer::deserialize($response, 'string', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
return array($this->apiClient->getSerializer()->deserialize($response, 'string', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \Swagger\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders());
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
@ -869,7 +831,6 @@ class PetApi
throw $e;
}
}
/**
* updatePet
*
@ -881,7 +842,7 @@ class PetApi
*/
public function updatePet($body = null)
{
list($response, $statusCode, $httpHeader) = $this->updatePetWithHttpInfo ($body);
list($response) = $this->updatePetWithHttpInfo ($body);
return $response;
}
@ -905,11 +866,11 @@ class PetApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json','application/xml'));
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/xml'));
@ -935,7 +896,6 @@ class PetApi
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -943,9 +903,8 @@ class PetApi
$queryParams, $httpBody,
$headerParams
);
return array(null, $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
}
@ -953,7 +912,6 @@ class PetApi
throw $e;
}
}
/**
* updatePetWithForm
*
@ -967,7 +925,7 @@ class PetApi
*/
public function updatePetWithForm($pet_id, $name = null, $status = null)
{
list($response, $statusCode, $httpHeader) = $this->updatePetWithFormWithHttpInfo ($pet_id, $name, $status);
list($response) = $this->updatePetWithFormWithHttpInfo ($pet_id, $name, $status);
return $response;
}
@ -997,16 +955,15 @@ class PetApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/x-www-form-urlencoded'));
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/x-www-form-urlencoded'));
// path params
if ($pet_id !== null) {
$resourcePath = str_replace(
"{" . "petId" . "}",
@ -1019,16 +976,10 @@ class PetApi
// form params
if ($name !== null) {
$formParams['name'] = $this->apiClient->getSerializer()->toFormValue($name);
}// form params
if ($status !== null) {
$formParams['status'] = $this->apiClient->getSerializer()->toFormValue($status);
}
@ -1043,7 +994,6 @@ class PetApi
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -1051,9 +1001,8 @@ class PetApi
$queryParams, $httpBody,
$headerParams
);
return array(null, $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
}
@ -1061,7 +1010,6 @@ class PetApi
throw $e;
}
}
/**
* uploadFile
*
@ -1075,7 +1023,7 @@ class PetApi
*/
public function uploadFile($pet_id, $additional_metadata = null, $file = null)
{
list($response, $statusCode, $httpHeader) = $this->uploadFileWithHttpInfo ($pet_id, $additional_metadata, $file);
list($response) = $this->uploadFileWithHttpInfo ($pet_id, $additional_metadata, $file);
return $response;
}
@ -1105,16 +1053,15 @@ class PetApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('multipart/form-data'));
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('multipart/form-data'));
// path params
if ($pet_id !== null) {
$resourcePath = str_replace(
"{" . "petId" . "}",
@ -1127,13 +1074,9 @@ class PetApi
// form params
if ($additional_metadata !== null) {
$formParams['additionalMetadata'] = $this->apiClient->getSerializer()->toFormValue($additional_metadata);
}// form params
if ($file !== null) {
// PHP 5.5 introduced a CurlFile object that deprecates the old @filename syntax
// See: https://wiki.php.net/rfc/curl-file-upload
if (function_exists('curl_file_create')) {
@ -1141,8 +1084,6 @@ class PetApi
} else {
$formParams['file'] = '@' . $this->apiClient->getSerializer()->toFormValue($file);
}
}
@ -1157,7 +1098,6 @@ class PetApi
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -1165,9 +1105,8 @@ class PetApi
$queryParams, $httpBody,
$headerParams
);
return array(null, $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
}
@ -1175,5 +1114,4 @@ class PetApi
throw $e;
}
}
}

View File

@ -90,7 +90,6 @@ class StoreApi
return $this;
}
/**
* deleteOrder
*
@ -102,7 +101,7 @@ class StoreApi
*/
public function deleteOrder($order_id)
{
list($response, $statusCode, $httpHeader) = $this->deleteOrderWithHttpInfo ($order_id);
list($response) = $this->deleteOrderWithHttpInfo ($order_id);
return $response;
}
@ -130,16 +129,15 @@ class StoreApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
// path params
if ($order_id !== null) {
$resourcePath = str_replace(
"{" . "orderId" . "}",
@ -159,17 +157,15 @@ class StoreApi
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// make the API Call
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'DELETE',
$queryParams, $httpBody,
$headerParams
);
return array(null, $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
}
@ -177,7 +173,6 @@ class StoreApi
throw $e;
}
}
/**
* findOrdersByStatus
*
@ -189,7 +184,7 @@ class StoreApi
*/
public function findOrdersByStatus($status = null)
{
list($response, $statusCode, $httpHeader) = $this->findOrdersByStatusWithHttpInfo ($status);
list($response) = $this->findOrdersByStatusWithHttpInfo ($status);
return $response;
}
@ -213,14 +208,13 @@ class StoreApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
// query params
if ($status !== null) {
$queryParams['status'] = $this->apiClient->getSerializer()->toQueryValue($status);
}
@ -245,14 +239,13 @@ class StoreApi
$headerParams['x-test_api_client_id'] = $apiKey;
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('x-test_api_client_secret');
if (strlen($apiKey) !== 0) {
$headerParams['x-test_api_client_secret'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -260,17 +253,15 @@ class StoreApi
$queryParams, $httpBody,
$headerParams, '\Swagger\Client\Model\Order[]'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\Swagger\Client\ObjectSerializer::deserialize($response, '\Swagger\Client\Model\Order[]', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
return array($this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Order[]', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \Swagger\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\Swagger\Client\Model\Order[]', $e->getResponseHeaders());
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Order[]', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
@ -278,7 +269,6 @@ class StoreApi
throw $e;
}
}
/**
* getInventory
*
@ -289,7 +279,7 @@ class StoreApi
*/
public function getInventory()
{
list($response, $statusCode, $httpHeader) = $this->getInventoryWithHttpInfo ();
list($response) = $this->getInventoryWithHttpInfo ();
return $response;
}
@ -312,11 +302,11 @@ class StoreApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
@ -340,7 +330,6 @@ class StoreApi
$headerParams['api_key'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -348,17 +337,15 @@ class StoreApi
$queryParams, $httpBody,
$headerParams, 'map[string,int]'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\Swagger\Client\ObjectSerializer::deserialize($response, 'map[string,int]', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
return array($this->apiClient->getSerializer()->deserialize($response, 'map[string,int]', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \Swagger\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'map[string,int]', $e->getResponseHeaders());
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'map[string,int]', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
@ -366,7 +353,6 @@ class StoreApi
throw $e;
}
}
/**
* getInventoryInObject
*
@ -377,7 +363,7 @@ class StoreApi
*/
public function getInventoryInObject()
{
list($response, $statusCode, $httpHeader) = $this->getInventoryInObjectWithHttpInfo ();
list($response) = $this->getInventoryInObjectWithHttpInfo ();
return $response;
}
@ -395,16 +381,16 @@ class StoreApi
// parse inputs
$resourcePath = "/store/inventory?response=arbitrary_object";
$resourcePath = "/store/inventory?response=arbitrary_object";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
@ -428,7 +414,6 @@ class StoreApi
$headerParams['api_key'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -436,17 +421,15 @@ class StoreApi
$queryParams, $httpBody,
$headerParams, 'object'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\Swagger\Client\ObjectSerializer::deserialize($response, 'object', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
return array($this->apiClient->getSerializer()->deserialize($response, 'object', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \Swagger\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'object', $e->getResponseHeaders());
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'object', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
@ -454,7 +437,6 @@ class StoreApi
throw $e;
}
}
/**
* getOrderById
*
@ -466,7 +448,7 @@ class StoreApi
*/
public function getOrderById($order_id)
{
list($response, $statusCode, $httpHeader) = $this->getOrderByIdWithHttpInfo ($order_id);
list($response) = $this->getOrderByIdWithHttpInfo ($order_id);
return $response;
}
@ -494,16 +476,15 @@ class StoreApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
// path params
if ($order_id !== null) {
$resourcePath = str_replace(
"{" . "orderId" . "}",
@ -530,14 +511,13 @@ class StoreApi
$headerParams['test_api_key_header'] = $apiKey;
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('test_api_key_query');
if (strlen($apiKey) !== 0) {
$queryParams['test_api_key_query'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -545,17 +525,15 @@ class StoreApi
$queryParams, $httpBody,
$headerParams, '\Swagger\Client\Model\Order'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\Swagger\Client\ObjectSerializer::deserialize($response, '\Swagger\Client\Model\Order', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
return array($this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Order', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \Swagger\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\Swagger\Client\Model\Order', $e->getResponseHeaders());
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Order', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
@ -563,7 +541,6 @@ class StoreApi
throw $e;
}
}
/**
* placeOrder
*
@ -575,7 +552,7 @@ class StoreApi
*/
public function placeOrder($body = null)
{
list($response, $statusCode, $httpHeader) = $this->placeOrderWithHttpInfo ($body);
list($response) = $this->placeOrderWithHttpInfo ($body);
return $response;
}
@ -599,11 +576,11 @@ class StoreApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
@ -631,14 +608,13 @@ class StoreApi
$headerParams['x-test_api_client_id'] = $apiKey;
}
// this endpoint requires API key authentication
$apiKey = $this->apiClient->getApiKeyWithPrefix('x-test_api_client_secret');
if (strlen($apiKey) !== 0) {
$headerParams['x-test_api_client_secret'] = $apiKey;
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -646,17 +622,15 @@ class StoreApi
$queryParams, $httpBody,
$headerParams, '\Swagger\Client\Model\Order'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\Swagger\Client\ObjectSerializer::deserialize($response, '\Swagger\Client\Model\Order', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
return array($this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\Order', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \Swagger\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\Swagger\Client\Model\Order', $e->getResponseHeaders());
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Order', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
@ -664,5 +638,4 @@ class StoreApi
throw $e;
}
}
}

View File

@ -90,7 +90,6 @@ class UserApi
return $this;
}
/**
* createUser
*
@ -102,7 +101,7 @@ class UserApi
*/
public function createUser($body = null)
{
list($response, $statusCode, $httpHeader) = $this->createUserWithHttpInfo ($body);
list($response) = $this->createUserWithHttpInfo ($body);
return $response;
}
@ -126,11 +125,11 @@ class UserApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
@ -151,17 +150,15 @@ class UserApi
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// make the API Call
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'POST',
$queryParams, $httpBody,
$headerParams
);
return array(null, $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
}
@ -169,7 +166,6 @@ class UserApi
throw $e;
}
}
/**
* createUsersWithArrayInput
*
@ -181,7 +177,7 @@ class UserApi
*/
public function createUsersWithArrayInput($body = null)
{
list($response, $statusCode, $httpHeader) = $this->createUsersWithArrayInputWithHttpInfo ($body);
list($response) = $this->createUsersWithArrayInputWithHttpInfo ($body);
return $response;
}
@ -205,11 +201,11 @@ class UserApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
@ -230,17 +226,15 @@ class UserApi
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// make the API Call
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'POST',
$queryParams, $httpBody,
$headerParams
);
return array(null, $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
}
@ -248,7 +242,6 @@ class UserApi
throw $e;
}
}
/**
* createUsersWithListInput
*
@ -260,7 +253,7 @@ class UserApi
*/
public function createUsersWithListInput($body = null)
{
list($response, $statusCode, $httpHeader) = $this->createUsersWithListInputWithHttpInfo ($body);
list($response) = $this->createUsersWithListInputWithHttpInfo ($body);
return $response;
}
@ -284,11 +277,11 @@ class UserApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
@ -309,17 +302,15 @@ class UserApi
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// make the API Call
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'POST',
$queryParams, $httpBody,
$headerParams
);
return array(null, $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
}
@ -327,7 +318,6 @@ class UserApi
throw $e;
}
}
/**
* deleteUser
*
@ -339,7 +329,7 @@ class UserApi
*/
public function deleteUser($username)
{
list($response, $statusCode, $httpHeader) = $this->deleteUserWithHttpInfo ($username);
list($response) = $this->deleteUserWithHttpInfo ($username);
return $response;
}
@ -367,16 +357,15 @@ class UserApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
// path params
if ($username !== null) {
$resourcePath = str_replace(
"{" . "username" . "}",
@ -401,7 +390,6 @@ class UserApi
if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) {
$headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword());
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
@ -409,9 +397,8 @@ class UserApi
$queryParams, $httpBody,
$headerParams
);
return array(null, $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
}
@ -419,19 +406,18 @@ class UserApi
throw $e;
}
}
/**
* getUserByName
*
* Get user by user name
*
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
* @return \Swagger\Client\Model\User
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function getUserByName($username)
{
list($response, $statusCode, $httpHeader) = $this->getUserByNameWithHttpInfo ($username);
list($response) = $this->getUserByNameWithHttpInfo ($username);
return $response;
}
@ -441,7 +427,7 @@ class UserApi
*
* Get user by user name
*
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
* @return Array of \Swagger\Client\Model\User, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@ -459,16 +445,15 @@ class UserApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
// path params
if ($username !== null) {
$resourcePath = str_replace(
"{" . "username" . "}",
@ -488,25 +473,22 @@ class UserApi
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// make the API Call
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'GET',
$queryParams, $httpBody,
$headerParams, '\Swagger\Client\Model\User'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\Swagger\Client\ObjectSerializer::deserialize($response, '\Swagger\Client\Model\User', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
return array($this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\User', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \Swagger\Client\ObjectSerializer::deserialize($e->getResponseBody(), '\Swagger\Client\Model\User', $e->getResponseHeaders());
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\User', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
@ -514,7 +496,6 @@ class UserApi
throw $e;
}
}
/**
* loginUser
*
@ -527,7 +508,7 @@ class UserApi
*/
public function loginUser($username = null, $password = null)
{
list($response, $statusCode, $httpHeader) = $this->loginUserWithHttpInfo ($username, $password);
list($response) = $this->loginUserWithHttpInfo ($username, $password);
return $response;
}
@ -552,18 +533,16 @@ class UserApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
// query params
if ($username !== null) {
$queryParams['username'] = $this->apiClient->getSerializer()->toQueryValue($username);
}// query params
if ($password !== null) {
$queryParams['password'] = $this->apiClient->getSerializer()->toQueryValue($password);
}
@ -581,25 +560,22 @@ class UserApi
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// make the API Call
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'GET',
$queryParams, $httpBody,
$headerParams, 'string'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array(\Swagger\Client\ObjectSerializer::deserialize($response, 'string', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
return array($this->apiClient->getSerializer()->deserialize($response, 'string', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = \Swagger\Client\ObjectSerializer::deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders());
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
@ -607,7 +583,6 @@ class UserApi
throw $e;
}
}
/**
* logoutUser
*
@ -618,7 +593,7 @@ class UserApi
*/
public function logoutUser()
{
list($response, $statusCode, $httpHeader) = $this->logoutUserWithHttpInfo ();
list($response) = $this->logoutUserWithHttpInfo ();
return $response;
}
@ -641,11 +616,11 @@ class UserApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
@ -662,17 +637,15 @@ class UserApi
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// make the API Call
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'GET',
$queryParams, $httpBody,
$headerParams
);
return array(null, $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
}
@ -680,7 +653,6 @@ class UserApi
throw $e;
}
}
/**
* updateUser
*
@ -693,7 +665,7 @@ class UserApi
*/
public function updateUser($username, $body = null)
{
list($response, $statusCode, $httpHeader) = $this->updateUserWithHttpInfo ($username, $body);
list($response) = $this->updateUserWithHttpInfo ($username, $body);
return $response;
}
@ -722,16 +694,15 @@ class UserApi
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml'));
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
// path params
if ($username !== null) {
$resourcePath = str_replace(
"{" . "username" . "}",
@ -755,17 +726,15 @@ class UserApi
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// make the API Call
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, 'PUT',
$queryParams, $httpBody,
$headerParams
);
return array(null, $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
}
@ -773,5 +742,4 @@ class UserApi
throw $e;
}
}
}

View File

@ -259,7 +259,7 @@ class ApiClient
*
* @return string Accept (e.g. application/json)
*/
public static function selectHeaderAccept($accept)
public function selectHeaderAccept($accept)
{
if (count($accept) === 0 or (count($accept) === 1 and $accept[0] === '')) {
return null;
@ -277,7 +277,7 @@ class ApiClient
*
* @return string Content-Type (e.g. application/json)
*/
public static function selectHeaderContentType($content_type)
public function selectHeaderContentType($content_type)
{
if (count($content_type) === 0 or (count($content_type) === 1 and $content_type[0] === '')) {
return 'application/json';
@ -299,9 +299,9 @@ class ApiClient
{
// ref/credit: http://php.net/manual/en/function.http-parse-headers.php#112986
$headers = array();
$key = ''; // [+]
$key = '';
foreach(explode("\n", $raw_headers) as $i => $h)
foreach(explode("\n", $raw_headers) as $h)
{
$h = explode(':', $h, 2);
@ -311,26 +311,22 @@ class ApiClient
$headers[$h[0]] = trim($h[1]);
elseif (is_array($headers[$h[0]]))
{
// $tmp = array_merge($headers[$h[0]], array(trim($h[1]))); // [-]
// $headers[$h[0]] = $tmp; // [-]
$headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1]))); // [+]
$headers[$h[0]] = array_merge($headers[$h[0]], array(trim($h[1])));
}
else
{
// $tmp = array_merge(array($headers[$h[0]]), array(trim($h[1]))); // [-]
// $headers[$h[0]] = $tmp; // [-]
$headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1]))); // [+]
$headers[$h[0]] = array_merge(array($headers[$h[0]]), array(trim($h[1])));
}
$key = $h[0]; // [+]
$key = $h[0];
}
else
{
if (substr($h[0], 0, 1) == "\t")
$headers[$key] .= "\r\n\t".trim($h[0]);
elseif (!$key)
$headers[0] = trim($h[0]);trim($h[0]);
}
else // [+]
{ // [+]
if (substr($h[0], 0, 1) == "\t") // [+]
$headers[$key] .= "\r\n\t".trim($h[0]); // [+]
elseif (!$key) // [+]
$headers[0] = trim($h[0]);trim($h[0]); // [+]
} // [+]
}
return $headers;

View File

@ -94,13 +94,11 @@ class Animal implements ArrayAccess
return self::$getters;
}
/**
* $class_name
* @var string
*/
protected $class_name;
/**
* Constructor
@ -113,7 +111,6 @@ class Animal implements ArrayAccess
$this->class_name = $data["class_name"];
}
}
/**
* Gets class_name
* @return string
@ -134,7 +131,6 @@ class Animal implements ArrayAccess
$this->class_name = $class_name;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@ -182,10 +178,10 @@ class Animal implements ArrayAccess
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -94,13 +94,11 @@ class Cat extends Animal implements ArrayAccess
return parent::getters() + self::$getters;
}
/**
* $declawed
* @var bool
*/
protected $declawed;
/**
* Constructor
@ -113,7 +111,6 @@ class Cat extends Animal implements ArrayAccess
$this->declawed = $data["declawed"];
}
}
/**
* Gets declawed
* @return bool
@ -134,7 +131,6 @@ class Cat extends Animal implements ArrayAccess
$this->declawed = $declawed;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@ -182,10 +178,10 @@ class Cat extends Animal implements ArrayAccess
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -98,19 +98,16 @@ class Category implements ArrayAccess
return self::$getters;
}
/**
* $id
* @var int
*/
protected $id;
/**
* $name
* @var string
*/
protected $name;
/**
* Constructor
@ -124,7 +121,6 @@ class Category implements ArrayAccess
$this->name = $data["name"];
}
}
/**
* Gets id
* @return int
@ -145,7 +141,6 @@ class Category implements ArrayAccess
$this->id = $id;
return $this;
}
/**
* Gets name
* @return string
@ -166,7 +161,6 @@ class Category implements ArrayAccess
$this->name = $name;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@ -214,10 +208,10 @@ class Category implements ArrayAccess
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -94,13 +94,11 @@ class Dog extends Animal implements ArrayAccess
return parent::getters() + self::$getters;
}
/**
* $breed
* @var string
*/
protected $breed;
/**
* Constructor
@ -113,7 +111,6 @@ class Dog extends Animal implements ArrayAccess
$this->breed = $data["breed"];
}
}
/**
* Gets breed
* @return string
@ -134,7 +131,6 @@ class Dog extends Animal implements ArrayAccess
$this->breed = $breed;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@ -182,10 +178,10 @@ class Dog extends Animal implements ArrayAccess
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -114,43 +114,36 @@ class InlineResponse200 implements ArrayAccess
return self::$getters;
}
/**
* $tags
* @var \Swagger\Client\Model\Tag[]
*/
protected $tags;
/**
* $id
* @var int
*/
protected $id;
/**
* $category
* @var object
*/
protected $category;
/**
* $status pet status in the store
* @var string
*/
protected $status;
/**
* $name
* @var string
*/
protected $name;
/**
* $photo_urls
* @var string[]
*/
protected $photo_urls;
/**
* Constructor
@ -168,7 +161,6 @@ class InlineResponse200 implements ArrayAccess
$this->photo_urls = $data["photo_urls"];
}
}
/**
* Gets tags
* @return \Swagger\Client\Model\Tag[]
@ -189,7 +181,6 @@ class InlineResponse200 implements ArrayAccess
$this->tags = $tags;
return $this;
}
/**
* Gets id
* @return int
@ -210,7 +201,6 @@ class InlineResponse200 implements ArrayAccess
$this->id = $id;
return $this;
}
/**
* Gets category
* @return object
@ -231,7 +221,6 @@ class InlineResponse200 implements ArrayAccess
$this->category = $category;
return $this;
}
/**
* Gets status
* @return string
@ -255,7 +244,6 @@ class InlineResponse200 implements ArrayAccess
$this->status = $status;
return $this;
}
/**
* Gets name
* @return string
@ -276,7 +264,6 @@ class InlineResponse200 implements ArrayAccess
$this->name = $name;
return $this;
}
/**
* Gets photo_urls
* @return string[]
@ -297,7 +284,6 @@ class InlineResponse200 implements ArrayAccess
$this->photo_urls = $photo_urls;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@ -345,10 +331,10 @@ class InlineResponse200 implements ArrayAccess
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -38,7 +38,7 @@ use \ArrayAccess;
* Model200Response Class Doc Comment
*
* @category Class
* @description
* @description Model for testing model name starting with number
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
@ -94,13 +94,11 @@ class Model200Response implements ArrayAccess
return self::$getters;
}
/**
* $name
* @var int
*/
protected $name;
/**
* Constructor
@ -113,7 +111,6 @@ class Model200Response implements ArrayAccess
$this->name = $data["name"];
}
}
/**
* Gets name
* @return int
@ -134,7 +131,6 @@ class Model200Response implements ArrayAccess
$this->name = $name;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@ -182,10 +178,10 @@ class Model200Response implements ArrayAccess
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -38,7 +38,7 @@ use \ArrayAccess;
* ModelReturn Class Doc Comment
*
* @category Class
* @description
* @description Model for testing reserved words
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
@ -94,13 +94,11 @@ class ModelReturn implements ArrayAccess
return self::$getters;
}
/**
* $return
* @var int
*/
protected $return;
/**
* Constructor
@ -113,7 +111,6 @@ class ModelReturn implements ArrayAccess
$this->return = $data["return"];
}
}
/**
* Gets return
* @return int
@ -134,7 +131,6 @@ class ModelReturn implements ArrayAccess
$this->return = $return;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@ -182,10 +178,10 @@ class ModelReturn implements ArrayAccess
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -38,7 +38,7 @@ use \ArrayAccess;
* Name Class Doc Comment
*
* @category Class
* @description
* @description Model for testing model name same as property name
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
@ -98,19 +98,16 @@ class Name implements ArrayAccess
return self::$getters;
}
/**
* $name
* @var int
*/
protected $name;
/**
* $snake_case
* @var int
*/
protected $snake_case;
/**
* Constructor
@ -124,7 +121,6 @@ class Name implements ArrayAccess
$this->snake_case = $data["snake_case"];
}
}
/**
* Gets name
* @return int
@ -145,7 +141,6 @@ class Name implements ArrayAccess
$this->name = $name;
return $this;
}
/**
* Gets snake_case
* @return int
@ -166,7 +161,6 @@ class Name implements ArrayAccess
$this->snake_case = $snake_case;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@ -214,10 +208,10 @@ class Name implements ArrayAccess
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -114,43 +114,36 @@ class Order implements ArrayAccess
return self::$getters;
}
/**
* $id
* @var int
*/
protected $id;
/**
* $pet_id
* @var int
*/
protected $pet_id;
/**
* $quantity
* @var int
*/
protected $quantity;
/**
* $ship_date
* @var \DateTime
*/
protected $ship_date;
/**
* $status Order Status
* @var string
*/
protected $status;
/**
* $complete
* @var bool
*/
protected $complete;
/**
* Constructor
@ -168,7 +161,6 @@ class Order implements ArrayAccess
$this->complete = $data["complete"];
}
}
/**
* Gets id
* @return int
@ -189,7 +181,6 @@ class Order implements ArrayAccess
$this->id = $id;
return $this;
}
/**
* Gets pet_id
* @return int
@ -210,7 +201,6 @@ class Order implements ArrayAccess
$this->pet_id = $pet_id;
return $this;
}
/**
* Gets quantity
* @return int
@ -231,7 +221,6 @@ class Order implements ArrayAccess
$this->quantity = $quantity;
return $this;
}
/**
* Gets ship_date
* @return \DateTime
@ -252,7 +241,6 @@ class Order implements ArrayAccess
$this->ship_date = $ship_date;
return $this;
}
/**
* Gets status
* @return string
@ -276,7 +264,6 @@ class Order implements ArrayAccess
$this->status = $status;
return $this;
}
/**
* Gets complete
* @return bool
@ -297,7 +284,6 @@ class Order implements ArrayAccess
$this->complete = $complete;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@ -345,10 +331,10 @@ class Order implements ArrayAccess
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -114,43 +114,36 @@ class Pet implements ArrayAccess
return self::$getters;
}
/**
* $id
* @var int
*/
protected $id;
/**
* $category
* @var \Swagger\Client\Model\Category
*/
protected $category;
/**
* $name
* @var string
*/
protected $name;
/**
* $photo_urls
* @var string[]
*/
protected $photo_urls;
/**
* $tags
* @var \Swagger\Client\Model\Tag[]
*/
protected $tags;
/**
* $status pet status in the store
* @var string
*/
protected $status;
/**
* Constructor
@ -168,7 +161,6 @@ class Pet implements ArrayAccess
$this->status = $data["status"];
}
}
/**
* Gets id
* @return int
@ -189,7 +181,6 @@ class Pet implements ArrayAccess
$this->id = $id;
return $this;
}
/**
* Gets category
* @return \Swagger\Client\Model\Category
@ -210,7 +201,6 @@ class Pet implements ArrayAccess
$this->category = $category;
return $this;
}
/**
* Gets name
* @return string
@ -231,7 +221,6 @@ class Pet implements ArrayAccess
$this->name = $name;
return $this;
}
/**
* Gets photo_urls
* @return string[]
@ -252,7 +241,6 @@ class Pet implements ArrayAccess
$this->photo_urls = $photo_urls;
return $this;
}
/**
* Gets tags
* @return \Swagger\Client\Model\Tag[]
@ -273,7 +261,6 @@ class Pet implements ArrayAccess
$this->tags = $tags;
return $this;
}
/**
* Gets status
* @return string
@ -297,7 +284,6 @@ class Pet implements ArrayAccess
$this->status = $status;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@ -345,10 +331,10 @@ class Pet implements ArrayAccess
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -94,13 +94,11 @@ class SpecialModelName implements ArrayAccess
return self::$getters;
}
/**
* $special_property_name
* @var int
*/
protected $special_property_name;
/**
* Constructor
@ -113,7 +111,6 @@ class SpecialModelName implements ArrayAccess
$this->special_property_name = $data["special_property_name"];
}
}
/**
* Gets special_property_name
* @return int
@ -134,7 +131,6 @@ class SpecialModelName implements ArrayAccess
$this->special_property_name = $special_property_name;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@ -182,10 +178,10 @@ class SpecialModelName implements ArrayAccess
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -98,19 +98,16 @@ class Tag implements ArrayAccess
return self::$getters;
}
/**
* $id
* @var int
*/
protected $id;
/**
* $name
* @var string
*/
protected $name;
/**
* Constructor
@ -124,7 +121,6 @@ class Tag implements ArrayAccess
$this->name = $data["name"];
}
}
/**
* Gets id
* @return int
@ -145,7 +141,6 @@ class Tag implements ArrayAccess
$this->id = $id;
return $this;
}
/**
* Gets name
* @return string
@ -166,7 +161,6 @@ class Tag implements ArrayAccess
$this->name = $name;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@ -214,10 +208,10 @@ class Tag implements ArrayAccess
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -122,55 +122,46 @@ class User implements ArrayAccess
return self::$getters;
}
/**
* $id
* @var int
*/
protected $id;
/**
* $username
* @var string
*/
protected $username;
/**
* $first_name
* @var string
*/
protected $first_name;
/**
* $last_name
* @var string
*/
protected $last_name;
/**
* $email
* @var string
*/
protected $email;
/**
* $password
* @var string
*/
protected $password;
/**
* $phone
* @var string
*/
protected $phone;
/**
* $user_status User Status
* @var int
*/
protected $user_status;
/**
* Constructor
@ -190,7 +181,6 @@ class User implements ArrayAccess
$this->user_status = $data["user_status"];
}
}
/**
* Gets id
* @return int
@ -211,7 +201,6 @@ class User implements ArrayAccess
$this->id = $id;
return $this;
}
/**
* Gets username
* @return string
@ -232,7 +221,6 @@ class User implements ArrayAccess
$this->username = $username;
return $this;
}
/**
* Gets first_name
* @return string
@ -253,7 +241,6 @@ class User implements ArrayAccess
$this->first_name = $first_name;
return $this;
}
/**
* Gets last_name
* @return string
@ -274,7 +261,6 @@ class User implements ArrayAccess
$this->last_name = $last_name;
return $this;
}
/**
* Gets email
* @return string
@ -295,7 +281,6 @@ class User implements ArrayAccess
$this->email = $email;
return $this;
}
/**
* Gets password
* @return string
@ -316,7 +301,6 @@ class User implements ArrayAccess
$this->password = $password;
return $this;
}
/**
* Gets phone
* @return string
@ -337,7 +321,6 @@ class User implements ArrayAccess
$this->phone = $phone;
return $this;
}
/**
* Gets user_status
* @return int
@ -358,7 +341,6 @@ class User implements ArrayAccess
$this->user_status = $user_status;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
* @param integer $offset Offset
@ -406,10 +388,10 @@ class User implements ArrayAccess
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
} else {
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@ -55,14 +55,14 @@ class ObjectSerializer
public static function sanitizeForSerialization($data)
{
if (is_scalar($data) || null === $data) {
$sanitized = $data;
return $data;
} elseif ($data instanceof \DateTime) {
$sanitized = $data->format(\DateTime::ATOM);
return $data->format(\DateTime::ATOM);
} elseif (is_array($data)) {
foreach ($data as $property => $value) {
$data[$property] = self::sanitizeForSerialization($value);
}
$sanitized = $data;
return $data;
} elseif (is_object($data)) {
$values = array();
foreach (array_keys($data::swaggerTypes()) as $property) {
@ -71,12 +71,10 @@ class ObjectSerializer
$values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($data->$getter());
}
}
$sanitized = (object)$values;
return (object)$values;
} else {
$sanitized = (string)$data;
return (string)$data;
}
return $sanitized;
}
/**
@ -224,7 +222,7 @@ class ObjectSerializer
public static function deserialize($data, $class, $httpHeaders=null, $discriminator=null)
{
if (null === $data) {
$deserialized = null;
return null;
} elseif (substr($class, 0, 4) === 'map[') { // for associative array e.g. map[string,int]
$inner = substr($class, 4, -1);
$deserialized = array();
@ -235,16 +233,17 @@ class ObjectSerializer
$deserialized[$key] = self::deserialize($value, $subClass, null, $discriminator);
}
}
return $deserialized;
} elseif (strcasecmp(substr($class, -2), '[]') == 0) {
$subClass = substr($class, 0, -2);
$values = array();
foreach ($data as $key => $value) {
$values[] = self::deserialize($value, $subClass, null, $discriminator);
}
$deserialized = $values;
return $values;
} elseif ($class === 'object') {
settype($data, 'array');
$deserialized = $data;
return $data;
} elseif ($class === '\DateTime') {
// Some API's return an invalid, empty string as a
// date-time property. DateTime::__construct() will return
@ -253,13 +252,13 @@ class ObjectSerializer
// be interpreted as a missing field/value. Let's handle
// this graceful.
if (!empty($data)) {
$deserialized = new \DateTime($data);
return new \DateTime($data);
} else {
$deserialized = null;
return null;
}
} elseif (in_array($class, array('integer', 'int', 'void', 'number', 'object', 'double', 'float', 'byte', 'DateTime', 'string', 'mixed', 'boolean', 'bool'))) {
settype($data, $class);
$deserialized = $data;
return $data;
} elseif ($class === '\SplFileObject') {
// determine file name
if (array_key_exists('Content-Disposition', $httpHeaders) && preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)) {
@ -270,7 +269,8 @@ class ObjectSerializer
$deserialized = new \SplFileObject($filename, "w");
$byte_written = $deserialized->fwrite($data);
error_log("[INFO] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.\n", 3, Configuration::getDefaultConfiguration()->getDebugFile());
return $deserialized;
} else {
// If a discriminator is defined and points to a valid subclass, use it.
if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) {
@ -292,9 +292,7 @@ class ObjectSerializer
$instance->$propertySetter(self::deserialize($propertyValue, $type, null, $discriminator));
}
}
$deserialized = $instance;
return $instance;
}
return $deserialized;
}
}

View File

@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
* Model200ResponseTest Class Doc Comment
*
* @category Class
* @description
* @description Model for testing model name starting with number
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2

View File

@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
* ModelReturnTest Class Doc Comment
*
* @category Class
* @description
* @description Model for testing reserved words
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2

View File

@ -37,7 +37,7 @@ namespace Swagger\Client\Model;
* NameTest Class Doc Comment
*
* @category Class
* @description
* @description Model for testing model name same as property name
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2

View File

@ -64,7 +64,6 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
}
/**
* Test case for addPet
*
@ -74,7 +73,6 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
public function test_addPet() {
}
/**
* Test case for addPetUsingByteArray
*
@ -84,7 +82,6 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
public function test_addPetUsingByteArray() {
}
/**
* Test case for deletePet
*
@ -94,7 +91,6 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
public function test_deletePet() {
}
/**
* Test case for findPetsByStatus
*
@ -104,7 +100,6 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
public function test_findPetsByStatus() {
}
/**
* Test case for findPetsByTags
*
@ -114,7 +109,6 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
public function test_findPetsByTags() {
}
/**
* Test case for getPetById
*
@ -124,7 +118,6 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
public function test_getPetById() {
}
/**
* Test case for getPetByIdInObject
*
@ -134,7 +127,6 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
public function test_getPetByIdInObject() {
}
/**
* Test case for petPetIdtestingByteArraytrueGet
*
@ -144,7 +136,6 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
public function test_petPetIdtestingByteArraytrueGet() {
}
/**
* Test case for updatePet
*
@ -154,7 +145,6 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
public function test_updatePet() {
}
/**
* Test case for updatePetWithForm
*
@ -164,7 +154,6 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
public function test_updatePetWithForm() {
}
/**
* Test case for uploadFile
*
@ -174,5 +163,4 @@ class PetApiTest extends \PHPUnit_Framework_TestCase
public function test_uploadFile() {
}
}

View File

@ -64,7 +64,6 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase
}
/**
* Test case for deleteOrder
*
@ -74,7 +73,6 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase
public function test_deleteOrder() {
}
/**
* Test case for findOrdersByStatus
*
@ -84,7 +82,6 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase
public function test_findOrdersByStatus() {
}
/**
* Test case for getInventory
*
@ -94,7 +91,6 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase
public function test_getInventory() {
}
/**
* Test case for getInventoryInObject
*
@ -104,7 +100,6 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase
public function test_getInventoryInObject() {
}
/**
* Test case for getOrderById
*
@ -114,7 +109,6 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase
public function test_getOrderById() {
}
/**
* Test case for placeOrder
*
@ -124,5 +118,4 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase
public function test_placeOrder() {
}
}

View File

@ -64,7 +64,6 @@ class UserApiTest extends \PHPUnit_Framework_TestCase
}
/**
* Test case for createUser
*
@ -74,7 +73,6 @@ class UserApiTest extends \PHPUnit_Framework_TestCase
public function test_createUser() {
}
/**
* Test case for createUsersWithArrayInput
*
@ -84,7 +82,6 @@ class UserApiTest extends \PHPUnit_Framework_TestCase
public function test_createUsersWithArrayInput() {
}
/**
* Test case for createUsersWithListInput
*
@ -94,7 +91,6 @@ class UserApiTest extends \PHPUnit_Framework_TestCase
public function test_createUsersWithListInput() {
}
/**
* Test case for deleteUser
*
@ -104,7 +100,6 @@ class UserApiTest extends \PHPUnit_Framework_TestCase
public function test_deleteUser() {
}
/**
* Test case for getUserByName
*
@ -114,7 +109,6 @@ class UserApiTest extends \PHPUnit_Framework_TestCase
public function test_getUserByName() {
}
/**
* Test case for loginUser
*
@ -124,7 +118,6 @@ class UserApiTest extends \PHPUnit_Framework_TestCase
public function test_loginUser() {
}
/**
* Test case for logoutUser
*
@ -134,7 +127,6 @@ class UserApiTest extends \PHPUnit_Framework_TestCase
public function test_logoutUser() {
}
/**
* Test case for updateUser
*
@ -144,5 +136,4 @@ class UserApiTest extends \PHPUnit_Framework_TestCase
public function test_updateUser() {
}
}