[PHP] Better PSR2 compatibility (#3863)

* feature(php-cs-fixer) add php-cs-fixer support

* feature(php-cs-fixer) tweak Mustache templates to fit PSR2

* feature(php-cs-fixer) bin/php-petstore.sh output
This commit is contained in:
Dalibor Karlović
2016-09-27 02:23:44 +02:00
committed by wing328
parent 0f25501746
commit 70fa2fb78e
48 changed files with 1079 additions and 1062 deletions

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* AdditionalPropertiesClass Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,10 +65,10 @@ class AdditionalPropertiesClass implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'map_property' => 'map[string,string]',
'map_of_map_property' => 'map[string,map[string,string]]'
);
];
public static function swaggerTypes()
{
@@ -79,39 +79,41 @@ class AdditionalPropertiesClass implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'map_property' => 'map_property',
'map_of_map_property' => 'map_of_map_property'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'map_property' => 'setMapProperty',
'map_of_map_property' => 'setMapOfMapProperty'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'map_property' => 'getMapProperty',
'map_of_map_property' => 'getMapOfMapProperty'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'map_property' => 'setMapProperty',
'map_of_map_property' => 'setMapOfMapProperty'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'map_property' => 'getMapProperty',
'map_of_map_property' => 'getMapOfMapProperty'
);
public static function getters()
{
return self::$getters;
@@ -125,7 +127,7 @@ class AdditionalPropertiesClass implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -144,7 +146,7 @@ class AdditionalPropertiesClass implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -259,5 +261,3 @@ class AdditionalPropertiesClass implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* Animal Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,10 +65,10 @@ class Animal implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'class_name' => 'string',
'color' => 'string'
);
];
public static function swaggerTypes()
{
@@ -79,39 +79,41 @@ class Animal implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'class_name' => 'className',
'color' => 'color'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'class_name' => 'setClassName',
'color' => 'setColor'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'class_name' => 'getClassName',
'color' => 'getColor'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'class_name' => 'setClassName',
'color' => 'setColor'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'class_name' => 'getClassName',
'color' => 'getColor'
);
public static function getters()
{
return self::$getters;
@@ -125,7 +127,7 @@ class Animal implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -148,7 +150,7 @@ class Animal implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
if ($this->container['class_name'] === null) {
$invalid_properties[] = "'class_name' can't be null";
}
@@ -269,5 +271,3 @@ class Animal implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* AnimalFarm Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,9 +65,9 @@ class AnimalFarm implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
);
];
public static function swaggerTypes()
{
@@ -78,36 +78,38 @@ class AnimalFarm implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
);
public static function getters()
{
return self::$getters;
@@ -121,7 +123,7 @@ class AnimalFarm implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -138,7 +140,7 @@ class AnimalFarm implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -211,5 +213,3 @@ class AnimalFarm implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* ApiResponse Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,11 +65,11 @@ class ApiResponse implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'code' => 'int',
'type' => 'string',
'message' => 'string'
);
];
public static function swaggerTypes()
{
@@ -80,42 +80,44 @@ class ApiResponse implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'code' => 'code',
'type' => 'type',
'message' => 'message'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'type' => 'setType',
'message' => 'setMessage'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'type' => 'getType',
'message' => 'getMessage'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'code' => 'setCode',
'type' => 'setType',
'message' => 'setMessage'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'code' => 'getCode',
'type' => 'getType',
'message' => 'getMessage'
);
public static function getters()
{
return self::$getters;
@@ -129,7 +131,7 @@ class ApiResponse implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -149,7 +151,7 @@ class ApiResponse implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -285,5 +287,3 @@ class ApiResponse implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* ArrayOfArrayOfNumberOnly Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,9 +65,9 @@ class ArrayOfArrayOfNumberOnly implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'array_array_number' => 'float[][]'
);
];
public static function swaggerTypes()
{
@@ -78,36 +78,38 @@ class ArrayOfArrayOfNumberOnly implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'array_array_number' => 'ArrayArrayNumber'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'array_array_number' => 'setArrayArrayNumber'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'array_array_number' => 'getArrayArrayNumber'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'array_array_number' => 'setArrayArrayNumber'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'array_array_number' => 'getArrayArrayNumber'
);
public static function getters()
{
return self::$getters;
@@ -121,7 +123,7 @@ class ArrayOfArrayOfNumberOnly implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -139,7 +141,7 @@ class ArrayOfArrayOfNumberOnly implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -233,5 +235,3 @@ class ArrayOfArrayOfNumberOnly implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* ArrayOfNumberOnly Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,9 +65,9 @@ class ArrayOfNumberOnly implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'array_number' => 'float[]'
);
];
public static function swaggerTypes()
{
@@ -78,36 +78,38 @@ class ArrayOfNumberOnly implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'array_number' => 'ArrayNumber'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'array_number' => 'setArrayNumber'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'array_number' => 'getArrayNumber'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'array_number' => 'setArrayNumber'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'array_number' => 'getArrayNumber'
);
public static function getters()
{
return self::$getters;
@@ -121,7 +123,7 @@ class ArrayOfNumberOnly implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -139,7 +141,7 @@ class ArrayOfNumberOnly implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -233,5 +235,3 @@ class ArrayOfNumberOnly implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* ArrayTest Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,11 +65,11 @@ class ArrayTest implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'array_of_string' => 'string[]',
'array_array_of_integer' => 'int[][]',
'array_array_of_model' => '\Swagger\Client\Model\ReadOnlyFirst[][]'
);
];
public static function swaggerTypes()
{
@@ -80,42 +80,44 @@ class ArrayTest implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'array_of_string' => 'array_of_string',
'array_array_of_integer' => 'array_array_of_integer',
'array_array_of_model' => 'array_array_of_model'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'array_of_string' => 'setArrayOfString',
'array_array_of_integer' => 'setArrayArrayOfInteger',
'array_array_of_model' => 'setArrayArrayOfModel'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'array_of_string' => 'getArrayOfString',
'array_array_of_integer' => 'getArrayArrayOfInteger',
'array_array_of_model' => 'getArrayArrayOfModel'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'array_of_string' => 'setArrayOfString',
'array_array_of_integer' => 'setArrayArrayOfInteger',
'array_array_of_model' => 'setArrayArrayOfModel'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'array_of_string' => 'getArrayOfString',
'array_array_of_integer' => 'getArrayArrayOfInteger',
'array_array_of_model' => 'getArrayArrayOfModel'
);
public static function getters()
{
return self::$getters;
@@ -129,7 +131,7 @@ class ArrayTest implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -149,7 +151,7 @@ class ArrayTest implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -285,5 +287,3 @@ class ArrayTest implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* Cat Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,9 +65,9 @@ class Cat extends Animal implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'declawed' => 'bool'
);
];
public static function swaggerTypes()
{
@@ -78,36 +78,38 @@ class Cat extends Animal implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'declawed' => 'declawed'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'declawed' => 'setDeclawed'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'declawed' => 'getDeclawed'
];
public static function attributeMap()
{
return parent::attributeMap() + self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'declawed' => 'setDeclawed'
);
public static function setters()
{
return parent::setters() + self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'declawed' => 'getDeclawed'
);
public static function getters()
{
return parent::getters() + self::$getters;
@@ -121,7 +123,7 @@ class Cat extends Animal implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -141,7 +143,7 @@ class Cat extends Animal implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -235,5 +237,3 @@ class Cat extends Animal implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* Category Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,10 +65,10 @@ class Category implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'id' => 'int',
'name' => 'string'
);
];
public static function swaggerTypes()
{
@@ -79,39 +79,41 @@ class Category implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'id' => 'id',
'name' => 'name'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'name' => 'setName'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'name' => 'getName'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'id' => 'setId',
'name' => 'setName'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'id' => 'getId',
'name' => 'getName'
);
public static function getters()
{
return self::$getters;
@@ -125,7 +127,7 @@ class Category implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -144,7 +146,7 @@ class Category implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -259,5 +261,3 @@ class Category implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* Client Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,9 +65,9 @@ class Client implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'client' => 'string'
);
];
public static function swaggerTypes()
{
@@ -78,36 +78,38 @@ class Client implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'client' => 'client'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'client' => 'setClient'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'client' => 'getClient'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'client' => 'setClient'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'client' => 'getClient'
);
public static function getters()
{
return self::$getters;
@@ -121,7 +123,7 @@ class Client implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -139,7 +141,7 @@ class Client implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -233,5 +235,3 @@ class Client implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* Dog Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,9 +65,9 @@ class Dog extends Animal implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'breed' => 'string'
);
];
public static function swaggerTypes()
{
@@ -78,36 +78,38 @@ class Dog extends Animal implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'breed' => 'breed'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'breed' => 'setBreed'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'breed' => 'getBreed'
];
public static function attributeMap()
{
return parent::attributeMap() + self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'breed' => 'setBreed'
);
public static function setters()
{
return parent::setters() + self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'breed' => 'getBreed'
);
public static function getters()
{
return parent::getters() + self::$getters;
@@ -121,7 +123,7 @@ class Dog extends Animal implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -141,7 +143,7 @@ class Dog extends Animal implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -235,5 +237,3 @@ class Dog extends Animal implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* EnumArrays Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,10 +65,10 @@ class EnumArrays implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'just_symbol' => 'string',
'array_enum' => 'string[]'
);
];
public static function swaggerTypes()
{
@@ -79,39 +79,41 @@ class EnumArrays implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'just_symbol' => 'just_symbol',
'array_enum' => 'array_enum'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'just_symbol' => 'setJustSymbol',
'array_enum' => 'setArrayEnum'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'just_symbol' => 'getJustSymbol',
'array_enum' => 'getArrayEnum'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'just_symbol' => 'setJustSymbol',
'array_enum' => 'setArrayEnum'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'just_symbol' => 'getJustSymbol',
'array_enum' => 'getArrayEnum'
);
public static function getters()
{
return self::$getters;
@@ -153,7 +155,7 @@ class EnumArrays implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -172,8 +174,8 @@ class EnumArrays implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$allowed_values = array(">=", "$");
$invalid_properties = [];
$allowed_values = [">=", "$"];
if (!in_array($this->container['just_symbol'], $allowed_values)) {
$invalid_properties[] = "invalid value for 'just_symbol', must be one of #{allowed_values}.";
}
@@ -189,7 +191,7 @@ class EnumArrays implements ArrayAccess
*/
public function valid()
{
$allowed_values = array(">=", "$");
$allowed_values = [">=", "$"];
if (!in_array($this->container['just_symbol'], $allowed_values)) {
return false;
}
@@ -304,5 +306,3 @@ class EnumArrays implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* EnumClass Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -61,5 +61,3 @@ class EnumClass {
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* EnumTest Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,11 +65,11 @@ class EnumTest implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'enum_string' => 'string',
'enum_integer' => 'int',
'enum_number' => 'double'
);
];
public static function swaggerTypes()
{
@@ -80,42 +80,44 @@ class EnumTest implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'enum_string' => 'enum_string',
'enum_integer' => 'enum_integer',
'enum_number' => 'enum_number'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'enum_string' => 'setEnumString',
'enum_integer' => 'setEnumInteger',
'enum_number' => 'setEnumNumber'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'enum_string' => 'getEnumString',
'enum_integer' => 'getEnumInteger',
'enum_number' => 'getEnumNumber'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'enum_string' => 'setEnumString',
'enum_integer' => 'setEnumInteger',
'enum_number' => 'setEnumNumber'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'enum_string' => 'getEnumString',
'enum_integer' => 'getEnumInteger',
'enum_number' => 'getEnumNumber'
);
public static function getters()
{
return self::$getters;
@@ -171,7 +173,7 @@ class EnumTest implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -191,18 +193,18 @@ class EnumTest implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$allowed_values = array("UPPER", "lower");
$invalid_properties = [];
$allowed_values = ["UPPER", "lower"];
if (!in_array($this->container['enum_string'], $allowed_values)) {
$invalid_properties[] = "invalid value for 'enum_string', must be one of #{allowed_values}.";
}
$allowed_values = array("1", "-1");
$allowed_values = ["1", "-1"];
if (!in_array($this->container['enum_integer'], $allowed_values)) {
$invalid_properties[] = "invalid value for 'enum_integer', must be one of #{allowed_values}.";
}
$allowed_values = array("1.1", "-1.2");
$allowed_values = ["1.1", "-1.2"];
if (!in_array($this->container['enum_number'], $allowed_values)) {
$invalid_properties[] = "invalid value for 'enum_number', must be one of #{allowed_values}.";
}
@@ -218,15 +220,15 @@ class EnumTest implements ArrayAccess
*/
public function valid()
{
$allowed_values = array("UPPER", "lower");
$allowed_values = ["UPPER", "lower"];
if (!in_array($this->container['enum_string'], $allowed_values)) {
return false;
}
$allowed_values = array("1", "-1");
$allowed_values = ["1", "-1"];
if (!in_array($this->container['enum_integer'], $allowed_values)) {
return false;
}
$allowed_values = array("1.1", "-1.2");
$allowed_values = ["1.1", "-1.2"];
if (!in_array($this->container['enum_number'], $allowed_values)) {
return false;
}
@@ -366,5 +368,3 @@ class EnumTest implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* FormatTest Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,7 +65,7 @@ class FormatTest implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'integer' => 'int',
'int32' => 'int',
'int64' => 'int',
@@ -79,7 +79,7 @@ class FormatTest implements ArrayAccess
'date_time' => '\DateTime',
'uuid' => 'string',
'password' => 'string'
);
];
public static function swaggerTypes()
{
@@ -90,7 +90,7 @@ class FormatTest implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'integer' => 'integer',
'int32' => 'int32',
'int64' => 'int64',
@@ -104,18 +104,14 @@ class FormatTest implements ArrayAccess
'date_time' => 'dateTime',
'uuid' => 'uuid',
'password' => 'password'
);
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
protected static $setters = [
'integer' => 'setInteger',
'int32' => 'setInt32',
'int64' => 'setInt64',
@@ -129,18 +125,14 @@ class FormatTest implements ArrayAccess
'date_time' => 'setDateTime',
'uuid' => 'setUuid',
'password' => 'setPassword'
);
];
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
protected static $getters = [
'integer' => 'getInteger',
'int32' => 'getInt32',
'int64' => 'getInt64',
@@ -154,7 +146,17 @@ class FormatTest implements ArrayAccess
'date_time' => 'getDateTime',
'uuid' => 'getUuid',
'password' => 'getPassword'
);
];
public static function attributeMap()
{
return self::$attributeMap;
}
public static function setters()
{
return self::$setters;
}
public static function getters()
{
@@ -169,7 +171,7 @@ class FormatTest implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -199,7 +201,7 @@ class FormatTest implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
if (!is_null($this->container['integer']) && ($this->container['integer'] > 100.0)) {
$invalid_properties[] = "invalid value for 'integer', must be smaller than or equal to 100.0.";
}
@@ -712,5 +714,3 @@ class FormatTest implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* HasOnlyReadOnly Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,10 +65,10 @@ class HasOnlyReadOnly implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'bar' => 'string',
'foo' => 'string'
);
];
public static function swaggerTypes()
{
@@ -79,39 +79,41 @@ class HasOnlyReadOnly implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'bar' => 'bar',
'foo' => 'foo'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'bar' => 'setBar',
'foo' => 'setFoo'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'bar' => 'getBar',
'foo' => 'getFoo'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'bar' => 'setBar',
'foo' => 'setFoo'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'bar' => 'getBar',
'foo' => 'getFoo'
);
public static function getters()
{
return self::$getters;
@@ -125,7 +127,7 @@ class HasOnlyReadOnly implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -144,7 +146,7 @@ class HasOnlyReadOnly implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -259,5 +261,3 @@ class HasOnlyReadOnly implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* MapTest Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,10 +65,10 @@ class MapTest implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'map_map_of_string' => 'map[string,map[string,string]]',
'map_of_enum_string' => 'map[string,string]'
);
];
public static function swaggerTypes()
{
@@ -79,39 +79,41 @@ class MapTest implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'map_map_of_string' => 'map_map_of_string',
'map_of_enum_string' => 'map_of_enum_string'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'map_map_of_string' => 'setMapMapOfString',
'map_of_enum_string' => 'setMapOfEnumString'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'map_map_of_string' => 'getMapMapOfString',
'map_of_enum_string' => 'getMapOfEnumString'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'map_map_of_string' => 'setMapMapOfString',
'map_of_enum_string' => 'setMapOfEnumString'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'map_map_of_string' => 'getMapMapOfString',
'map_of_enum_string' => 'getMapOfEnumString'
);
public static function getters()
{
return self::$getters;
@@ -139,7 +141,7 @@ class MapTest implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -158,7 +160,7 @@ class MapTest implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -277,5 +279,3 @@ class MapTest implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* MixedPropertiesAndAdditionalPropertiesClass Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,11 +65,11 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'uuid' => 'string',
'date_time' => '\DateTime',
'map' => 'map[string,\Swagger\Client\Model\Animal]'
);
];
public static function swaggerTypes()
{
@@ -80,42 +80,44 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'uuid' => 'uuid',
'date_time' => 'dateTime',
'map' => 'map'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'uuid' => 'setUuid',
'date_time' => 'setDateTime',
'map' => 'setMap'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'uuid' => 'getUuid',
'date_time' => 'getDateTime',
'map' => 'getMap'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'uuid' => 'setUuid',
'date_time' => 'setDateTime',
'map' => 'setMap'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'uuid' => 'getUuid',
'date_time' => 'getDateTime',
'map' => 'getMap'
);
public static function getters()
{
return self::$getters;
@@ -129,7 +131,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -149,7 +151,7 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -285,5 +287,3 @@ class MixedPropertiesAndAdditionalPropertiesClass implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -48,7 +48,7 @@ use \ArrayAccess;
*
* @category Class */
// @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 License v2
@@ -66,10 +66,10 @@ class Model200Response implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'name' => 'int',
'class' => 'string'
);
];
public static function swaggerTypes()
{
@@ -80,39 +80,41 @@ class Model200Response implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'name' => 'name',
'class' => 'class'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'name' => 'setName',
'class' => 'setClass'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'name' => 'getName',
'class' => 'getClass'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'name' => 'setName',
'class' => 'setClass'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'name' => 'getName',
'class' => 'getClass'
);
public static function getters()
{
return self::$getters;
@@ -126,7 +128,7 @@ class Model200Response implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -145,7 +147,7 @@ class Model200Response implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -260,5 +262,3 @@ class Model200Response implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* ModelList Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,9 +65,9 @@ class ModelList implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'_123_list' => 'string'
);
];
public static function swaggerTypes()
{
@@ -78,36 +78,38 @@ class ModelList implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'_123_list' => '123-list'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'_123_list' => 'set123List'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'_123_list' => 'get123List'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'_123_list' => 'set123List'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'_123_list' => 'get123List'
);
public static function getters()
{
return self::$getters;
@@ -121,7 +123,7 @@ class ModelList implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -139,7 +141,7 @@ class ModelList implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -233,5 +235,3 @@ class ModelList implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -48,7 +48,7 @@ use \ArrayAccess;
*
* @category Class */
// @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 License v2
@@ -66,9 +66,9 @@ class ModelReturn implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'return' => 'int'
);
];
public static function swaggerTypes()
{
@@ -79,36 +79,38 @@ class ModelReturn implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
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'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'return' => 'setReturn'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'return' => 'getReturn'
);
public static function getters()
{
return self::$getters;
@@ -122,7 +124,7 @@ class ModelReturn implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -140,7 +142,7 @@ class ModelReturn implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -234,5 +236,3 @@ class ModelReturn implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -48,7 +48,7 @@ use \ArrayAccess;
*
* @category Class */
// @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 License v2
@@ -66,12 +66,12 @@ class Name implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'name' => 'int',
'snake_case' => 'int',
'property' => 'string',
'_123_number' => 'int'
);
];
public static function swaggerTypes()
{
@@ -82,45 +82,47 @@ class Name implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'name' => 'name',
'snake_case' => 'snake_case',
'property' => 'property',
'_123_number' => '123Number'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'name' => 'setName',
'snake_case' => 'setSnakeCase',
'property' => 'setProperty',
'_123_number' => 'set123Number'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'name' => 'getName',
'snake_case' => 'getSnakeCase',
'property' => 'getProperty',
'_123_number' => 'get123Number'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'name' => 'setName',
'snake_case' => 'setSnakeCase',
'property' => 'setProperty',
'_123_number' => 'set123Number'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'name' => 'getName',
'snake_case' => 'getSnakeCase',
'property' => 'getProperty',
'_123_number' => 'get123Number'
);
public static function getters()
{
return self::$getters;
@@ -134,7 +136,7 @@ class Name implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -155,7 +157,7 @@ class Name implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
if ($this->container['name'] === null) {
$invalid_properties[] = "'name' can't be null";
}
@@ -318,5 +320,3 @@ class Name implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* NumberOnly Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,9 +65,9 @@ class NumberOnly implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'just_number' => 'float'
);
];
public static function swaggerTypes()
{
@@ -78,36 +78,38 @@ class NumberOnly implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'just_number' => 'JustNumber'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'just_number' => 'setJustNumber'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'just_number' => 'getJustNumber'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'just_number' => 'setJustNumber'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'just_number' => 'getJustNumber'
);
public static function getters()
{
return self::$getters;
@@ -121,7 +123,7 @@ class NumberOnly implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -139,7 +141,7 @@ class NumberOnly implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -233,5 +235,3 @@ class NumberOnly implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* Order Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,14 +65,14 @@ class Order implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'id' => 'int',
'pet_id' => 'int',
'quantity' => 'int',
'ship_date' => '\DateTime',
'status' => 'string',
'complete' => 'bool'
);
];
public static function swaggerTypes()
{
@@ -83,50 +83,52 @@ class Order implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'id' => 'id',
'pet_id' => 'petId',
'quantity' => 'quantity',
'ship_date' => 'shipDate',
'status' => 'status',
'complete' => 'complete'
);
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
protected static $setters = [
'id' => 'setId',
'pet_id' => 'setPetId',
'quantity' => 'setQuantity',
'ship_date' => 'setShipDate',
'status' => 'setStatus',
'complete' => 'setComplete'
);
];
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
protected static $getters = [
'id' => 'getId',
'pet_id' => 'getPetId',
'quantity' => 'getQuantity',
'ship_date' => 'getShipDate',
'status' => 'getStatus',
'complete' => 'getComplete'
);
];
public static function attributeMap()
{
return self::$attributeMap;
}
public static function setters()
{
return self::$setters;
}
public static function getters()
{
@@ -157,7 +159,7 @@ class Order implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -180,8 +182,8 @@ class Order implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$allowed_values = array("placed", "approved", "delivered");
$invalid_properties = [];
$allowed_values = ["placed", "approved", "delivered"];
if (!in_array($this->container['status'], $allowed_values)) {
$invalid_properties[] = "invalid value for 'status', must be one of #{allowed_values}.";
}
@@ -197,7 +199,7 @@ class Order implements ArrayAccess
*/
public function valid()
{
$allowed_values = array("placed", "approved", "delivered");
$allowed_values = ["placed", "approved", "delivered"];
if (!in_array($this->container['status'], $allowed_values)) {
return false;
}
@@ -392,5 +394,3 @@ class Order implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* Pet Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,14 +65,14 @@ class Pet implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'id' => 'int',
'category' => '\Swagger\Client\Model\Category',
'name' => 'string',
'photo_urls' => 'string[]',
'tags' => '\Swagger\Client\Model\Tag[]',
'status' => 'string'
);
];
public static function swaggerTypes()
{
@@ -83,50 +83,52 @@ class Pet implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'id' => 'id',
'category' => 'category',
'name' => 'name',
'photo_urls' => 'photoUrls',
'tags' => 'tags',
'status' => 'status'
);
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
protected static $setters = [
'id' => 'setId',
'category' => 'setCategory',
'name' => 'setName',
'photo_urls' => 'setPhotoUrls',
'tags' => 'setTags',
'status' => 'setStatus'
);
];
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
protected static $getters = [
'id' => 'getId',
'category' => 'getCategory',
'name' => 'getName',
'photo_urls' => 'getPhotoUrls',
'tags' => 'getTags',
'status' => 'getStatus'
);
];
public static function attributeMap()
{
return self::$attributeMap;
}
public static function setters()
{
return self::$setters;
}
public static function getters()
{
@@ -157,7 +159,7 @@ class Pet implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -180,14 +182,14 @@ class Pet implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
if ($this->container['name'] === null) {
$invalid_properties[] = "'name' can't be null";
}
if ($this->container['photo_urls'] === null) {
$invalid_properties[] = "'photo_urls' can't be null";
}
$allowed_values = array("available", "pending", "sold");
$allowed_values = ["available", "pending", "sold"];
if (!in_array($this->container['status'], $allowed_values)) {
$invalid_properties[] = "invalid value for 'status', must be one of #{allowed_values}.";
}
@@ -209,7 +211,7 @@ class Pet implements ArrayAccess
if ($this->container['photo_urls'] === null) {
return false;
}
$allowed_values = array("available", "pending", "sold");
$allowed_values = ["available", "pending", "sold"];
if (!in_array($this->container['status'], $allowed_values)) {
return false;
}
@@ -404,5 +406,3 @@ class Pet implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* ReadOnlyFirst Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,10 +65,10 @@ class ReadOnlyFirst implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'bar' => 'string',
'baz' => 'string'
);
];
public static function swaggerTypes()
{
@@ -79,39 +79,41 @@ class ReadOnlyFirst implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'bar' => 'bar',
'baz' => 'baz'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'bar' => 'setBar',
'baz' => 'setBaz'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'bar' => 'getBar',
'baz' => 'getBaz'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'bar' => 'setBar',
'baz' => 'setBaz'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'bar' => 'getBar',
'baz' => 'getBaz'
);
public static function getters()
{
return self::$getters;
@@ -125,7 +127,7 @@ class ReadOnlyFirst implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -144,7 +146,7 @@ class ReadOnlyFirst implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -259,5 +261,3 @@ class ReadOnlyFirst implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* SpecialModelName Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,9 +65,9 @@ class SpecialModelName implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'special_property_name' => 'int'
);
];
public static function swaggerTypes()
{
@@ -78,36 +78,38 @@ class SpecialModelName implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'special_property_name' => '$special[property.name]'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'special_property_name' => 'setSpecialPropertyName'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'special_property_name' => 'getSpecialPropertyName'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'special_property_name' => 'setSpecialPropertyName'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'special_property_name' => 'getSpecialPropertyName'
);
public static function getters()
{
return self::$getters;
@@ -121,7 +123,7 @@ class SpecialModelName implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -139,7 +141,7 @@ class SpecialModelName implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -233,5 +235,3 @@ class SpecialModelName implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* Tag Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,10 +65,10 @@ class Tag implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'id' => 'int',
'name' => 'string'
);
];
public static function swaggerTypes()
{
@@ -79,39 +79,41 @@ class Tag implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'id' => 'id',
'name' => 'name'
);
];
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'name' => 'setName'
];
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'name' => 'getName'
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
'id' => 'setId',
'name' => 'setName'
);
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
'id' => 'getId',
'name' => 'getName'
);
public static function getters()
{
return self::$getters;
@@ -125,7 +127,7 @@ class Tag implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -144,7 +146,7 @@ class Tag implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -259,5 +261,3 @@ class Tag implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}

View File

@@ -47,7 +47,7 @@ use \ArrayAccess;
* User Class Doc Comment
*
* @category Class */
/**
/**
* @package Swagger\Client
* @author http://github.com/swagger-api/swagger-codegen
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
@@ -65,7 +65,7 @@ class User implements ArrayAccess
* Array of property to type mappings. Used for (de)serialization
* @var string[]
*/
protected static $swaggerTypes = array(
protected static $swaggerTypes = [
'id' => 'int',
'username' => 'string',
'first_name' => 'string',
@@ -74,7 +74,7 @@ class User implements ArrayAccess
'password' => 'string',
'phone' => 'string',
'user_status' => 'int'
);
];
public static function swaggerTypes()
{
@@ -85,7 +85,7 @@ class User implements ArrayAccess
* Array of attributes where the key is the local name, and the value is the original name
* @var string[]
*/
protected static $attributeMap = array(
protected static $attributeMap = [
'id' => 'id',
'username' => 'username',
'first_name' => 'firstName',
@@ -94,18 +94,14 @@ class User implements ArrayAccess
'password' => 'password',
'phone' => 'phone',
'user_status' => 'userStatus'
);
];
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
* @var string[]
*/
protected static $setters = array(
protected static $setters = [
'id' => 'setId',
'username' => 'setUsername',
'first_name' => 'setFirstName',
@@ -114,18 +110,14 @@ class User implements ArrayAccess
'password' => 'setPassword',
'phone' => 'setPhone',
'user_status' => 'setUserStatus'
);
];
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
* @var string[]
*/
protected static $getters = array(
protected static $getters = [
'id' => 'getId',
'username' => 'getUsername',
'first_name' => 'getFirstName',
@@ -134,7 +126,17 @@ class User implements ArrayAccess
'password' => 'getPassword',
'phone' => 'getPhone',
'user_status' => 'getUserStatus'
);
];
public static function attributeMap()
{
return self::$attributeMap;
}
public static function setters()
{
return self::$setters;
}
public static function getters()
{
@@ -149,7 +151,7 @@ class User implements ArrayAccess
* Associative array for storing property values
* @var mixed[]
*/
protected $container = array();
protected $container = [];
/**
* Constructor
@@ -174,7 +176,7 @@ class User implements ArrayAccess
*/
public function listInvalidProperties()
{
$invalid_properties = array();
$invalid_properties = [];
return $invalid_properties;
}
@@ -415,5 +417,3 @@ class User implements ArrayAccess
return json_encode(\Swagger\Client\ObjectSerializer::sanitizeForSerialization($this));
}
}