From 442f87c19a08b5c797ca60796d54fa3a2437fa18 Mon Sep 17 00:00:00 2001 From: wing328 Date: Mon, 7 Dec 2015 00:42:25 +0800 Subject: [PATCH] minor style change for php functions --- .../src/main/resources/php/api.mustache | 4 +-- .../php/SwaggerClient-php/lib/Api/PetApi.php | 32 +++++++++---------- .../SwaggerClient-php/lib/Api/StoreApi.php | 16 +++++----- .../php/SwaggerClient-php/lib/Api/UserApi.php | 32 +++++++++---------- 4 files changed, 42 insertions(+), 42 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/php/api.mustache b/modules/swagger-codegen/src/main/resources/php/api.mustache index 0b28b2b4ca6..53a476b4061 100644 --- a/modules/swagger-codegen/src/main/resources/php/api.mustache +++ b/modules/swagger-codegen/src/main/resources/php/api.mustache @@ -100,7 +100,7 @@ use \{{invokerPackage}}\ObjectSerializer; {{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} * @throws \{{invokerPackage}}\ApiException on non-2xx response */ - public function {{operationId}} ({{#allParams}}${{paramName}}{{^required}}=null{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + public function {{operationId}}({{#allParams}}${{paramName}}{{^required}}=null{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { list($response, $statusCode, $httpHeader) = $this->{{operationId}}WithHttpInfo ({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); return $response; @@ -116,7 +116,7 @@ use \{{invokerPackage}}\ObjectSerializer; {{/allParams}} * @return Array of {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}null{{/returnType}}, HTTP status code, HTTP response headers (array of strings) * @throws \{{invokerPackage}}\ApiException on non-2xx response */ - public function {{operationId}}WithHttpInfo ({{#allParams}}${{paramName}}{{^required}}=null{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + public function {{operationId}}WithHttpInfo({{#allParams}}${{paramName}}{{^required}}=null{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) { {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php index c5ac2e17eb9..ed73dd64dc8 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php @@ -100,7 +100,7 @@ class PetApi * @return void * @throws \Swagger\Client\ApiException on non-2xx response */ - public function updatePet ($body=null) + public function updatePet($body=null) { list($response, $statusCode, $httpHeader) = $this->updatePetWithHttpInfo ($body); return $response; @@ -116,7 +116,7 @@ class PetApi * @return Array of null, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function updatePetWithHttpInfo ($body=null) + public function updatePetWithHttpInfo($body=null) { @@ -184,7 +184,7 @@ class PetApi * @return void * @throws \Swagger\Client\ApiException on non-2xx response */ - public function addPet ($body=null) + public function addPet($body=null) { list($response, $statusCode, $httpHeader) = $this->addPetWithHttpInfo ($body); return $response; @@ -200,7 +200,7 @@ class PetApi * @return Array of null, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function addPetWithHttpInfo ($body=null) + public function addPetWithHttpInfo($body=null) { @@ -268,7 +268,7 @@ class PetApi * @return \Swagger\Client\Model\Pet[] * @throws \Swagger\Client\ApiException on non-2xx response */ - public function findPetsByStatus ($status=null) + public function findPetsByStatus($status=null) { list($response, $statusCode, $httpHeader) = $this->findPetsByStatusWithHttpInfo ($status); return $response; @@ -284,7 +284,7 @@ class PetApi * @return Array of \Swagger\Client\Model\Pet[], HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function findPetsByStatusWithHttpInfo ($status=null) + public function findPetsByStatusWithHttpInfo($status=null) { @@ -359,7 +359,7 @@ class PetApi * @return \Swagger\Client\Model\Pet[] * @throws \Swagger\Client\ApiException on non-2xx response */ - public function findPetsByTags ($tags=null) + public function findPetsByTags($tags=null) { list($response, $statusCode, $httpHeader) = $this->findPetsByTagsWithHttpInfo ($tags); return $response; @@ -375,7 +375,7 @@ class PetApi * @return Array of \Swagger\Client\Model\Pet[], HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function findPetsByTagsWithHttpInfo ($tags=null) + public function findPetsByTagsWithHttpInfo($tags=null) { @@ -450,7 +450,7 @@ class PetApi * @return \Swagger\Client\Model\Pet * @throws \Swagger\Client\ApiException on non-2xx response */ - public function getPetById ($pet_id) + public function getPetById($pet_id) { list($response, $statusCode, $httpHeader) = $this->getPetByIdWithHttpInfo ($pet_id); return $response; @@ -466,7 +466,7 @@ class PetApi * @return Array of \Swagger\Client\Model\Pet, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function getPetByIdWithHttpInfo ($pet_id) + public function getPetByIdWithHttpInfo($pet_id) { // verify the required parameter 'pet_id' is set @@ -553,7 +553,7 @@ class PetApi * @return void * @throws \Swagger\Client\ApiException on non-2xx response */ - public function updatePetWithForm ($pet_id, $name=null, $status=null) + public function updatePetWithForm($pet_id, $name=null, $status=null) { list($response, $statusCode, $httpHeader) = $this->updatePetWithFormWithHttpInfo ($pet_id, $name, $status); return $response; @@ -571,7 +571,7 @@ class PetApi * @return Array of null, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function updatePetWithFormWithHttpInfo ($pet_id, $name=null, $status=null) + public function updatePetWithFormWithHttpInfo($pet_id, $name=null, $status=null) { // verify the required parameter 'pet_id' is set @@ -659,7 +659,7 @@ class PetApi * @return void * @throws \Swagger\Client\ApiException on non-2xx response */ - public function deletePet ($pet_id, $api_key=null) + public function deletePet($pet_id, $api_key=null) { list($response, $statusCode, $httpHeader) = $this->deletePetWithHttpInfo ($pet_id, $api_key); return $response; @@ -676,7 +676,7 @@ class PetApi * @return Array of null, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function deletePetWithHttpInfo ($pet_id, $api_key=null) + public function deletePetWithHttpInfo($pet_id, $api_key=null) { // verify the required parameter 'pet_id' is set @@ -756,7 +756,7 @@ class PetApi * @return void * @throws \Swagger\Client\ApiException on non-2xx response */ - public function uploadFile ($pet_id, $additional_metadata=null, $file=null) + public function uploadFile($pet_id, $additional_metadata=null, $file=null) { list($response, $statusCode, $httpHeader) = $this->uploadFileWithHttpInfo ($pet_id, $additional_metadata, $file); return $response; @@ -774,7 +774,7 @@ class PetApi * @return Array of null, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function uploadFileWithHttpInfo ($pet_id, $additional_metadata=null, $file=null) + public function uploadFileWithHttpInfo($pet_id, $additional_metadata=null, $file=null) { // verify the required parameter 'pet_id' is set 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 3deab979d41..34490783ffb 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php @@ -99,7 +99,7 @@ class StoreApi * @return map[string,int] * @throws \Swagger\Client\ApiException on non-2xx response */ - public function getInventory () + public function getInventory() { list($response, $statusCode, $httpHeader) = $this->getInventoryWithHttpInfo (); return $response; @@ -114,7 +114,7 @@ class StoreApi * @return Array of map[string,int], HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function getInventoryWithHttpInfo () + public function getInventoryWithHttpInfo() { @@ -188,7 +188,7 @@ class StoreApi * @return \Swagger\Client\Model\Order * @throws \Swagger\Client\ApiException on non-2xx response */ - public function placeOrder ($body=null) + public function placeOrder($body=null) { list($response, $statusCode, $httpHeader) = $this->placeOrderWithHttpInfo ($body); return $response; @@ -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 placeOrderWithHttpInfo ($body=null) + public function placeOrderWithHttpInfo($body=null) { @@ -275,7 +275,7 @@ class StoreApi * @return \Swagger\Client\Model\Order * @throws \Swagger\Client\ApiException on non-2xx response */ - public function getOrderById ($order_id) + public function getOrderById($order_id) { list($response, $statusCode, $httpHeader) = $this->getOrderByIdWithHttpInfo ($order_id); return $response; @@ -291,7 +291,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 getOrderByIdWithHttpInfo ($order_id) + public function getOrderByIdWithHttpInfo($order_id) { // verify the required parameter 'order_id' is set @@ -369,7 +369,7 @@ class StoreApi * @return void * @throws \Swagger\Client\ApiException on non-2xx response */ - public function deleteOrder ($order_id) + public function deleteOrder($order_id) { list($response, $statusCode, $httpHeader) = $this->deleteOrderWithHttpInfo ($order_id); return $response; @@ -385,7 +385,7 @@ class StoreApi * @return Array of null, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function deleteOrderWithHttpInfo ($order_id) + public function deleteOrderWithHttpInfo($order_id) { // verify the required parameter 'order_id' is set diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php index 98a26537f2a..2a19c2f7798 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php @@ -100,7 +100,7 @@ class UserApi * @return void * @throws \Swagger\Client\ApiException on non-2xx response */ - public function createUser ($body=null) + public function createUser($body=null) { list($response, $statusCode, $httpHeader) = $this->createUserWithHttpInfo ($body); return $response; @@ -116,7 +116,7 @@ class UserApi * @return Array of null, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function createUserWithHttpInfo ($body=null) + public function createUserWithHttpInfo($body=null) { @@ -179,7 +179,7 @@ class UserApi * @return void * @throws \Swagger\Client\ApiException on non-2xx response */ - public function createUsersWithArrayInput ($body=null) + public function createUsersWithArrayInput($body=null) { list($response, $statusCode, $httpHeader) = $this->createUsersWithArrayInputWithHttpInfo ($body); return $response; @@ -195,7 +195,7 @@ class UserApi * @return Array of null, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function createUsersWithArrayInputWithHttpInfo ($body=null) + public function createUsersWithArrayInputWithHttpInfo($body=null) { @@ -258,7 +258,7 @@ class UserApi * @return void * @throws \Swagger\Client\ApiException on non-2xx response */ - public function createUsersWithListInput ($body=null) + public function createUsersWithListInput($body=null) { list($response, $statusCode, $httpHeader) = $this->createUsersWithListInputWithHttpInfo ($body); return $response; @@ -274,7 +274,7 @@ class UserApi * @return Array of null, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function createUsersWithListInputWithHttpInfo ($body=null) + public function createUsersWithListInputWithHttpInfo($body=null) { @@ -338,7 +338,7 @@ class UserApi * @return string * @throws \Swagger\Client\ApiException on non-2xx response */ - public function loginUser ($username=null, $password=null) + public function loginUser($username=null, $password=null) { list($response, $statusCode, $httpHeader) = $this->loginUserWithHttpInfo ($username, $password); return $response; @@ -355,7 +355,7 @@ class UserApi * @return Array of string, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function loginUserWithHttpInfo ($username=null, $password=null) + public function loginUserWithHttpInfo($username=null, $password=null) { @@ -427,7 +427,7 @@ class UserApi * @return void * @throws \Swagger\Client\ApiException on non-2xx response */ - public function logoutUser () + public function logoutUser() { list($response, $statusCode, $httpHeader) = $this->logoutUserWithHttpInfo (); return $response; @@ -442,7 +442,7 @@ class UserApi * @return Array of null, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function logoutUserWithHttpInfo () + public function logoutUserWithHttpInfo() { @@ -501,7 +501,7 @@ class UserApi * @return \Swagger\Client\Model\User * @throws \Swagger\Client\ApiException on non-2xx response */ - public function getUserByName ($username) + public function getUserByName($username) { list($response, $statusCode, $httpHeader) = $this->getUserByNameWithHttpInfo ($username); return $response; @@ -517,7 +517,7 @@ class UserApi * @return Array of \Swagger\Client\Model\User, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function getUserByNameWithHttpInfo ($username) + public function getUserByNameWithHttpInfo($username) { // verify the required parameter 'username' is set @@ -596,7 +596,7 @@ class UserApi * @return void * @throws \Swagger\Client\ApiException on non-2xx response */ - public function updateUser ($username, $body=null) + public function updateUser($username, $body=null) { list($response, $statusCode, $httpHeader) = $this->updateUserWithHttpInfo ($username, $body); return $response; @@ -613,7 +613,7 @@ class UserApi * @return Array of null, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function updateUserWithHttpInfo ($username, $body=null) + public function updateUserWithHttpInfo($username, $body=null) { // verify the required parameter 'username' is set @@ -687,7 +687,7 @@ class UserApi * @return void * @throws \Swagger\Client\ApiException on non-2xx response */ - public function deleteUser ($username) + public function deleteUser($username) { list($response, $statusCode, $httpHeader) = $this->deleteUserWithHttpInfo ($username); return $response; @@ -703,7 +703,7 @@ class UserApi * @return Array of null, HTTP status code, HTTP response headers (array of strings) * @throws \Swagger\Client\ApiException on non-2xx response */ - public function deleteUserWithHttpInfo ($username) + public function deleteUserWithHttpInfo($username) { // verify the required parameter 'username' is set