diff --git a/modules/swagger-codegen/src/main/resources/php/model.mustache b/modules/swagger-codegen/src/main/resources/php/model.mustache index 32fe44e0af5..7cf71a77aa7 100644 --- a/modules/swagger-codegen/src/main/resources/php/model.mustache +++ b/modules/swagger-codegen/src/main/resources/php/model.mustache @@ -68,9 +68,9 @@ class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}implements ArrayA } /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ static $attributeMap = array( {{#vars}}'{{name}}' => '{{baseName}}'{{#hasMore}}, {{/hasMore}}{{/vars}} @@ -81,9 +81,9 @@ class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}implements ArrayA } /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ static $setters = array( {{#vars}}'{{name}}' => '{{setter}}'{{#hasMore}}, {{/hasMore}}{{/vars}} @@ -94,9 +94,9 @@ class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}implements ArrayA } /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ static $getters = array( {{#vars}}'{{name}}' => '{{getter}}'{{#hasMore}}, {{/hasMore}}{{/vars}} @@ -109,24 +109,24 @@ class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}implements ArrayA {{#vars}}{{#isEnum}}{{#allowableValues}}{{#enumVars}}const {{datatypeWithEnum}}_{{{name}}} = "{{{value}}}"; {{/enumVars}}{{/allowableValues}}{{/isEnum}}{{/vars}} - {{#isEnum}} + {{#vars}}{{#isEnum}} /** * Gets allowable values of the enum * @return string[] */ public function {{getter}}AllowableValues() { return [ - {{#allowableValues}}{{#values}}self::{{datatypeWithEnum}}_{{{this}}},{{^-last}} - {{/-last}}{{/values}}{{/allowableValues}} + {{#allowableValues}}{{#enumVars}}self::{{datatypeWithEnum}}_{{{name}}},{{^-last}} + {{/-last}}{{/enumVars}}{{/allowableValues}} ]; } - {{/isEnum}} + {{/isEnum}}{{/vars}} {{#vars}} /** - * ${{name}} {{#description}}{{{description}}}{{/description}} - * @var {{datatype}} - */ + * ${{name}} {{#description}}{{{description}}}{{/description}} + * @var {{datatype}} + */ protected ${{name}}{{#defaultValue}} = {{{defaultValue}}}{{/defaultValue}}; {{/vars}} diff --git a/samples/client/petstore/php/SwaggerClient-php/README.md b/samples/client/petstore/php/SwaggerClient-php/README.md index 5851cf5af7c..ff8c9322ed7 100644 --- a/samples/client/petstore/php/SwaggerClient-php/README.md +++ b/samples/client/petstore/php/SwaggerClient-php/README.md @@ -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-04-02T19:03:06.710+08:00 +- Build date: 2016-04-02T19:17:12.338+08:00 - Build package: class io.swagger.codegen.languages.PhpClientCodegen ## Requirements diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php index a6dbe683be3..4826f8dbbe2 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Animal.php @@ -47,9 +47,9 @@ use \ArrayAccess; class Animal implements ArrayAccess { /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * @var string[] + */ static $swaggerTypes = array( 'class_name' => 'string' ); @@ -59,9 +59,9 @@ class Animal implements ArrayAccess } /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ static $attributeMap = array( 'class_name' => 'className' ); @@ -71,9 +71,9 @@ class Animal implements ArrayAccess } /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ static $setters = array( 'class_name' => 'setClassName' ); @@ -83,9 +83,9 @@ class Animal implements ArrayAccess } /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ static $getters = array( 'class_name' => 'getClassName' ); @@ -100,9 +100,9 @@ class Animal implements ArrayAccess /** - * $class_name - * @var string - */ + * $class_name + * @var string + */ protected $class_name; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php index 8fefbd62c10..272f79ab02c 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Cat.php @@ -47,9 +47,9 @@ use \ArrayAccess; class Cat extends Animal implements ArrayAccess { /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * @var string[] + */ static $swaggerTypes = array( 'declawed' => 'bool' ); @@ -59,9 +59,9 @@ 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[] - */ + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ static $attributeMap = array( 'declawed' => 'declawed' ); @@ -71,9 +71,9 @@ class Cat extends Animal implements ArrayAccess } /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ static $setters = array( 'declawed' => 'setDeclawed' ); @@ -83,9 +83,9 @@ class Cat extends Animal implements ArrayAccess } /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ static $getters = array( 'declawed' => 'getDeclawed' ); @@ -100,9 +100,9 @@ class Cat extends Animal implements ArrayAccess /** - * $declawed - * @var bool - */ + * $declawed + * @var bool + */ protected $declawed; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php index ad1d379a8a3..f6dfe3d5d79 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php @@ -47,9 +47,9 @@ use \ArrayAccess; class Category implements ArrayAccess { /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * @var string[] + */ static $swaggerTypes = array( 'id' => 'int', 'name' => 'string' @@ -60,9 +60,9 @@ class Category implements ArrayAccess } /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ static $attributeMap = array( 'id' => 'id', 'name' => 'name' @@ -73,9 +73,9 @@ class Category implements ArrayAccess } /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ static $setters = array( 'id' => 'setId', 'name' => 'setName' @@ -86,9 +86,9 @@ class Category implements ArrayAccess } /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ static $getters = array( 'id' => 'getId', 'name' => 'getName' @@ -104,15 +104,15 @@ class Category implements ArrayAccess /** - * $id - * @var int - */ + * $id + * @var int + */ protected $id; /** - * $name - * @var string - */ + * $name + * @var string + */ protected $name; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php index a4251641749..289bee51b2f 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Dog.php @@ -47,9 +47,9 @@ use \ArrayAccess; class Dog extends Animal implements ArrayAccess { /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * @var string[] + */ static $swaggerTypes = array( 'breed' => 'string' ); @@ -59,9 +59,9 @@ 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[] - */ + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ static $attributeMap = array( 'breed' => 'breed' ); @@ -71,9 +71,9 @@ class Dog extends Animal implements ArrayAccess } /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ static $setters = array( 'breed' => 'setBreed' ); @@ -83,9 +83,9 @@ class Dog extends Animal implements ArrayAccess } /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ static $getters = array( 'breed' => 'getBreed' ); @@ -100,9 +100,9 @@ class Dog extends Animal implements ArrayAccess /** - * $breed - * @var string - */ + * $breed + * @var string + */ protected $breed; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/InlineResponse200.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/InlineResponse200.php index 69bc6d72dcf..b2bc6d52739 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/InlineResponse200.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/InlineResponse200.php @@ -47,9 +47,9 @@ use \ArrayAccess; class InlineResponse200 implements ArrayAccess { /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * @var string[] + */ static $swaggerTypes = array( 'tags' => '\Swagger\Client\Model\Tag[]', 'id' => 'int', @@ -64,9 +64,9 @@ class InlineResponse200 implements ArrayAccess } /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ static $attributeMap = array( 'tags' => 'tags', 'id' => 'id', @@ -81,9 +81,9 @@ class InlineResponse200 implements ArrayAccess } /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ static $setters = array( 'tags' => 'setTags', 'id' => 'setId', @@ -98,9 +98,9 @@ class InlineResponse200 implements ArrayAccess } /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ static $getters = array( 'tags' => 'getTags', 'id' => 'getId', @@ -120,42 +120,54 @@ class InlineResponse200 implements ArrayAccess + /** + * Gets allowable values of the enum + * @return string[] + */ + public function getStatusAllowableValues() { + return [ + self::STATUS_AVAILABLE, + self::STATUS_PENDING, + self::STATUS_SOLD, + ]; + } + /** - * $tags - * @var \Swagger\Client\Model\Tag[] - */ + * $tags + * @var \Swagger\Client\Model\Tag[] + */ protected $tags; /** - * $id - * @var int - */ + * $id + * @var int + */ protected $id; /** - * $category - * @var object - */ + * $category + * @var object + */ protected $category; /** - * $status pet status in the store - * @var string - */ + * $status pet status in the store + * @var string + */ protected $status; /** - * $name - * @var string - */ + * $name + * @var string + */ protected $name; /** - * $photo_urls - * @var string[] - */ + * $photo_urls + * @var string[] + */ protected $photo_urls; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php index 0a3ec1bc34c..a08f17478e2 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Model200Response.php @@ -47,9 +47,9 @@ use \ArrayAccess; class Model200Response implements ArrayAccess { /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * @var string[] + */ static $swaggerTypes = array( 'name' => 'int' ); @@ -59,9 +59,9 @@ class Model200Response implements ArrayAccess } /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ static $attributeMap = array( 'name' => 'name' ); @@ -71,9 +71,9 @@ class Model200Response implements ArrayAccess } /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ static $setters = array( 'name' => 'setName' ); @@ -83,9 +83,9 @@ class Model200Response implements ArrayAccess } /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ static $getters = array( 'name' => 'getName' ); @@ -100,9 +100,9 @@ class Model200Response implements ArrayAccess /** - * $name - * @var int - */ + * $name + * @var int + */ protected $name; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php index f3391fb9c88..e696b4085c8 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/ModelReturn.php @@ -47,9 +47,9 @@ use \ArrayAccess; class ModelReturn implements ArrayAccess { /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * @var string[] + */ static $swaggerTypes = array( 'return' => 'int' ); @@ -59,9 +59,9 @@ class ModelReturn implements ArrayAccess } /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ static $attributeMap = array( 'return' => 'return' ); @@ -71,9 +71,9 @@ class ModelReturn implements ArrayAccess } /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ static $setters = array( 'return' => 'setReturn' ); @@ -83,9 +83,9 @@ class ModelReturn implements ArrayAccess } /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ static $getters = array( 'return' => 'getReturn' ); @@ -100,9 +100,9 @@ class ModelReturn implements ArrayAccess /** - * $return - * @var int - */ + * $return + * @var int + */ protected $return; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php index 5154866eb62..52dcfc4abdf 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Name.php @@ -47,9 +47,9 @@ use \ArrayAccess; class Name implements ArrayAccess { /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * @var string[] + */ static $swaggerTypes = array( 'name' => 'int', 'snake_case' => 'int' @@ -60,9 +60,9 @@ class Name implements ArrayAccess } /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ static $attributeMap = array( 'name' => 'name', 'snake_case' => 'snake_case' @@ -73,9 +73,9 @@ class Name implements ArrayAccess } /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ static $setters = array( 'name' => 'setName', 'snake_case' => 'setSnakeCase' @@ -86,9 +86,9 @@ class Name implements ArrayAccess } /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ static $getters = array( 'name' => 'getName', 'snake_case' => 'getSnakeCase' @@ -104,15 +104,15 @@ class Name implements ArrayAccess /** - * $name - * @var int - */ + * $name + * @var int + */ protected $name; /** - * $snake_case - * @var int - */ + * $snake_case + * @var int + */ protected $snake_case; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php index 1335d16c472..7566c22776a 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php @@ -47,9 +47,9 @@ use \ArrayAccess; class Order implements ArrayAccess { /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * @var string[] + */ static $swaggerTypes = array( 'id' => 'int', 'pet_id' => 'int', @@ -64,9 +64,9 @@ class Order implements ArrayAccess } /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ static $attributeMap = array( 'id' => 'id', 'pet_id' => 'petId', @@ -81,9 +81,9 @@ class Order implements ArrayAccess } /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ static $setters = array( 'id' => 'setId', 'pet_id' => 'setPetId', @@ -98,9 +98,9 @@ class Order implements ArrayAccess } /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ static $getters = array( 'id' => 'getId', 'pet_id' => 'getPetId', @@ -120,42 +120,54 @@ class Order implements ArrayAccess + /** + * Gets allowable values of the enum + * @return string[] + */ + public function getStatusAllowableValues() { + return [ + self::STATUS_PLACED, + self::STATUS_APPROVED, + self::STATUS_DELIVERED, + ]; + } + /** - * $id - * @var int - */ + * $id + * @var int + */ protected $id; /** - * $pet_id - * @var int - */ + * $pet_id + * @var int + */ protected $pet_id; /** - * $quantity - * @var int - */ + * $quantity + * @var int + */ protected $quantity; /** - * $ship_date - * @var \DateTime - */ + * $ship_date + * @var \DateTime + */ protected $ship_date; /** - * $status Order Status - * @var string - */ + * $status Order Status + * @var string + */ protected $status; /** - * $complete - * @var bool - */ + * $complete + * @var bool + */ protected $complete; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php index 52d18a8150b..36a0c9dcc94 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php @@ -47,9 +47,9 @@ use \ArrayAccess; class Pet implements ArrayAccess { /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * @var string[] + */ static $swaggerTypes = array( 'id' => 'int', 'category' => '\Swagger\Client\Model\Category', @@ -64,9 +64,9 @@ class Pet implements ArrayAccess } /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ static $attributeMap = array( 'id' => 'id', 'category' => 'category', @@ -81,9 +81,9 @@ class Pet implements ArrayAccess } /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ static $setters = array( 'id' => 'setId', 'category' => 'setCategory', @@ -98,9 +98,9 @@ class Pet implements ArrayAccess } /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ static $getters = array( 'id' => 'getId', 'category' => 'getCategory', @@ -120,42 +120,54 @@ class Pet implements ArrayAccess + /** + * Gets allowable values of the enum + * @return string[] + */ + public function getStatusAllowableValues() { + return [ + self::STATUS_AVAILABLE, + self::STATUS_PENDING, + self::STATUS_SOLD, + ]; + } + /** - * $id - * @var int - */ + * $id + * @var int + */ protected $id; /** - * $category - * @var \Swagger\Client\Model\Category - */ + * $category + * @var \Swagger\Client\Model\Category + */ protected $category; /** - * $name - * @var string - */ + * $name + * @var string + */ protected $name; /** - * $photo_urls - * @var string[] - */ + * $photo_urls + * @var string[] + */ protected $photo_urls; /** - * $tags - * @var \Swagger\Client\Model\Tag[] - */ + * $tags + * @var \Swagger\Client\Model\Tag[] + */ protected $tags; /** - * $status pet status in the store - * @var string - */ + * $status pet status in the store + * @var string + */ protected $status; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php index e3f0430e6f6..891796ff783 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/SpecialModelName.php @@ -47,9 +47,9 @@ use \ArrayAccess; class SpecialModelName implements ArrayAccess { /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * @var string[] + */ static $swaggerTypes = array( 'special_property_name' => 'int' ); @@ -59,9 +59,9 @@ class SpecialModelName implements ArrayAccess } /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ static $attributeMap = array( 'special_property_name' => '$special[property.name]' ); @@ -71,9 +71,9 @@ class SpecialModelName implements ArrayAccess } /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ static $setters = array( 'special_property_name' => 'setSpecialPropertyName' ); @@ -83,9 +83,9 @@ class SpecialModelName implements ArrayAccess } /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ static $getters = array( 'special_property_name' => 'getSpecialPropertyName' ); @@ -100,9 +100,9 @@ class SpecialModelName implements ArrayAccess /** - * $special_property_name - * @var int - */ + * $special_property_name + * @var int + */ protected $special_property_name; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php index e96ed199fa6..90bf901355a 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php @@ -47,9 +47,9 @@ use \ArrayAccess; class Tag implements ArrayAccess { /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * @var string[] + */ static $swaggerTypes = array( 'id' => 'int', 'name' => 'string' @@ -60,9 +60,9 @@ class Tag implements ArrayAccess } /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ static $attributeMap = array( 'id' => 'id', 'name' => 'name' @@ -73,9 +73,9 @@ class Tag implements ArrayAccess } /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ static $setters = array( 'id' => 'setId', 'name' => 'setName' @@ -86,9 +86,9 @@ class Tag implements ArrayAccess } /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ static $getters = array( 'id' => 'getId', 'name' => 'getName' @@ -104,15 +104,15 @@ class Tag implements ArrayAccess /** - * $id - * @var int - */ + * $id + * @var int + */ protected $id; /** - * $name - * @var string - */ + * $name + * @var string + */ protected $name; diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php index 3a56a1e66d9..10580a05eb4 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php @@ -47,9 +47,9 @@ use \ArrayAccess; class User implements ArrayAccess { /** - * Array of property to type mappings. Used for (de)serialization - * @var string[] - */ + * Array of property to type mappings. Used for (de)serialization + * @var string[] + */ static $swaggerTypes = array( 'id' => 'int', 'username' => 'string', @@ -66,9 +66,9 @@ class User implements ArrayAccess } /** - * Array of attributes where the key is the local name, and the value is the original name - * @var string[] - */ + * Array of attributes where the key is the local name, and the value is the original name + * @var string[] + */ static $attributeMap = array( 'id' => 'id', 'username' => 'username', @@ -85,9 +85,9 @@ class User implements ArrayAccess } /** - * Array of attributes to setter functions (for deserialization of responses) - * @var string[] - */ + * Array of attributes to setter functions (for deserialization of responses) + * @var string[] + */ static $setters = array( 'id' => 'setId', 'username' => 'setUsername', @@ -104,9 +104,9 @@ class User implements ArrayAccess } /** - * Array of attributes to getter functions (for serialization of requests) - * @var string[] - */ + * Array of attributes to getter functions (for serialization of requests) + * @var string[] + */ static $getters = array( 'id' => 'getId', 'username' => 'getUsername', @@ -128,51 +128,51 @@ class User implements ArrayAccess /** - * $id - * @var int - */ + * $id + * @var int + */ protected $id; /** - * $username - * @var string - */ + * $username + * @var string + */ protected $username; /** - * $first_name - * @var string - */ + * $first_name + * @var string + */ protected $first_name; /** - * $last_name - * @var string - */ + * $last_name + * @var string + */ protected $last_name; /** - * $email - * @var string - */ + * $email + * @var string + */ protected $email; /** - * $password - * @var string - */ + * $password + * @var string + */ protected $password; /** - * $phone - * @var string - */ + * $phone + * @var string + */ protected $phone; /** - * $user_status User Status - * @var int - */ + * $user_status User Status + * @var int + */ protected $user_status;