diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java index 14cee8032b7..2d8f6a51fac 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PhpClientCodegen.java @@ -366,7 +366,7 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig { // model name cannot use reserved keyword if (reservedWords.contains(name)) { - escapeReservedWord(name); // e.g. return => _return + name = "object_" + name; // e.g. return => ObjectReturn (after camelize) } // camelize the model name diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php index bc13b27411c..8163ef43b39 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php @@ -180,7 +180,7 @@ class StoreApi } /** - * callReturn + * placeOrder * * Place an order for a pet * @@ -188,15 +188,15 @@ class StoreApi * @return \Swagger\Client\Model\Order * @throws \Swagger\Client\ApiException on non-2xx response */ - public function callReturn($body = null) + public function placeOrder($body = null) { - list($response, $statusCode, $httpHeader) = $this->callReturnWithHttpInfo ($body); + list($response, $statusCode, $httpHeader) = $this->placeOrderWithHttpInfo ($body); return $response; } /** - * callReturnWithHttpInfo + * placeOrderWithHttpInfo * * Place an order for a pet * @@ -204,7 +204,7 @@ class StoreApi * @return Array of \Swagger\Client\Model\Order, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function callReturnWithHttpInfo($body = null) + public function placeOrderWithHttpInfo($body = null) { diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Tests/StoreApiTest.php b/samples/client/petstore/php/SwaggerClient-php/lib/Tests/StoreApiTest.php index 8187547d681..899f5791c8a 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Tests/StoreApiTest.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Tests/StoreApiTest.php @@ -76,12 +76,12 @@ class StoreApiTest extends \PHPUnit_Framework_TestCase } /** - * Test case for callReturn + * Test case for placeOrder * * Place an order for a pet * */ - public function test_callReturn() { + public function test_placeOrder() { }