diff --git a/modules/swagger-codegen/src/main/resources/php/model_generic.mustache b/modules/swagger-codegen/src/main/resources/php/model_generic.mustache index 3c04809b492..0a2cf4cbe27 100644 --- a/modules/swagger-codegen/src/main/resources/php/model_generic.mustache +++ b/modules/swagger-codegen/src/main/resources/php/model_generic.mustache @@ -128,27 +128,27 @@ class {{classname}} {{#parentSchema}}extends {{{parent}}} {{/parentSchema}}imple {{/isEnum}} {{#hasValidation}} {{#maxLength}} - if ({{^required}}!is_null(${{$this->container['{{name}}']}}) && {{/required}}(strlen($this->container['{{name}}']) > {{maxLength}})) { + if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}(strlen($this->container['{{name}}']) > {{maxLength}})) { $invalid_properties[] = "invalid value for '{{name}}', the character length must be smaller than or equal to {{{maxLength}}}."; } {{/maxLength}} {{#minLength}} - if ({{^required}}!is_null(${{$this->container['{{name}}']}}) && {{/required}}(strlen($this->container['{{name}}']) < {{minLength}})) { + if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}(strlen($this->container['{{name}}']) < {{minLength}})) { $invalid_properties[] = "invalid value for '{{name}}', the character length must be bigger than or equal to {{{minLength}}}."; } {{/minLength}} {{#maximum}} - if ({{^required}}!is_null(${{$this->container['{{name}}']}}) && {{/required}}($this->container['{{name}}'] > {{maximum}})) { + if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}($this->container['{{name}}'] > {{maximum}})) { $invalid_properties[] = "invalid value for '{{name}}', must be smaller than or equal to {{maximum}}."; } {{/maximum}} {{#minimum}} - if ({{^required}}!is_null(${{$this->container['{{name}}']}}) && {{/required}}($this->container['{{name}}'] < {{minimum}})) { + if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}($this->container['{{name}}'] < {{minimum}})) { $invalid_properties[] = "invalid value for '{{name}}', must be bigger than or equal to {{minimum}}."; } {{/minimum}} {{#pattern}} - if ({{^required}}!is_null(${{$this->container['{{name}}']}}) && {{/required}}!preg_match("{{pattern}}", $this->container['{{name}}'])) { + if ({{^required}}!is_null($this->container['{{name}}']) && {{/required}}!preg_match("{{pattern}}", $this->container['{{name}}'])) { $invalid_properties[] = "invalid value for '{{name}}', must be conform to the pattern {{pattern}}."; } {{/pattern}} diff --git a/samples/client/petstore-security-test/php/SwaggerClient-php/README.md b/samples/client/petstore-security-test/php/SwaggerClient-php/README.md index 1b4d4de9e07..f574d0cd8e1 100644 --- a/samples/client/petstore-security-test/php/SwaggerClient-php/README.md +++ b/samples/client/petstore-security-test/php/SwaggerClient-php/README.md @@ -4,7 +4,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, mod This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: 1.0.0 *_/ ' \" =end -- \\r\\n \\n \\r -- Build date: 2016-07-29T14:59:34.783+02:00 +- Build date: 2016-08-01T11:48:23.775+02:00 - Build package: class io.swagger.codegen.languages.PhpClientCodegen ## Requirements diff --git a/samples/client/petstore/php/SwaggerClient-php/README.md b/samples/client/petstore/php/SwaggerClient-php/README.md index f5b4c31f8b8..5371cc2160a 100644 --- a/samples/client/petstore/php/SwaggerClient-php/README.md +++ b/samples/client/petstore/php/SwaggerClient-php/README.md @@ -4,7 +4,7 @@ This spec is mainly for testing Petstore server and contains fake endpoints, mod This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: 1.0.0 -- Build date: 2016-07-29T14:59:28.041+02:00 +- Build date: 2016-08-01T11:48:17.791+02:00 - Build package: class io.swagger.codegen.languages.PhpClientCodegen ## Requirements diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php index 854a8fdc654..bbc34b97907 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/FormatTest.php @@ -200,16 +200,16 @@ class FormatTest implements ArrayAccess public function listInvalidProperties() { $invalid_properties = array(); - if (!is_null(${{$this->container['integer']}}) && ($this->container['integer'] > 100.0)) { + 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."; } - if (!is_null(${{$this->container['integer']}}) && ($this->container['integer'] < 10.0)) { + if (!is_null($this->container['integer']) && ($this->container['integer'] < 10.0)) { $invalid_properties[] = "invalid value for 'integer', must be bigger than or equal to 10.0."; } - if (!is_null(${{$this->container['int32']}}) && ($this->container['int32'] > 200.0)) { + if (!is_null($this->container['int32']) && ($this->container['int32'] > 200.0)) { $invalid_properties[] = "invalid value for 'int32', must be smaller than or equal to 200.0."; } - if (!is_null(${{$this->container['int32']}}) && ($this->container['int32'] < 20.0)) { + if (!is_null($this->container['int32']) && ($this->container['int32'] < 20.0)) { $invalid_properties[] = "invalid value for 'int32', must be bigger than or equal to 20.0."; } if ($this->container['number'] === null) { @@ -221,19 +221,19 @@ class FormatTest implements ArrayAccess if (($this->container['number'] < 32.1)) { $invalid_properties[] = "invalid value for 'number', must be bigger than or equal to 32.1."; } - if (!is_null(${{$this->container['float']}}) && ($this->container['float'] > 987.6)) { + if (!is_null($this->container['float']) && ($this->container['float'] > 987.6)) { $invalid_properties[] = "invalid value for 'float', must be smaller than or equal to 987.6."; } - if (!is_null(${{$this->container['float']}}) && ($this->container['float'] < 54.3)) { + if (!is_null($this->container['float']) && ($this->container['float'] < 54.3)) { $invalid_properties[] = "invalid value for 'float', must be bigger than or equal to 54.3."; } - if (!is_null(${{$this->container['double']}}) && ($this->container['double'] > 123.4)) { + if (!is_null($this->container['double']) && ($this->container['double'] > 123.4)) { $invalid_properties[] = "invalid value for 'double', must be smaller than or equal to 123.4."; } - if (!is_null(${{$this->container['double']}}) && ($this->container['double'] < 67.8)) { + if (!is_null($this->container['double']) && ($this->container['double'] < 67.8)) { $invalid_properties[] = "invalid value for 'double', must be bigger than or equal to 67.8."; } - if (!is_null(${{$this->container['string']}}) && !preg_match("/[a-z]/i", $this->container['string'])) { + if (!is_null($this->container['string']) && !preg_match("/[a-z]/i", $this->container['string'])) { $invalid_properties[] = "invalid value for 'string', must be conform to the pattern /[a-z]/i."; } if ($this->container['byte'] === null) {