Skip to content

Commit 6ab51bc

Browse files
committed
remove tab with 2 spaces in php api template
1 parent 1c547e9 commit 6ab51bc

File tree

4 files changed

+308
-308
lines changed

4 files changed

+308
-308
lines changed

modules/swagger-codegen/src/main/resources/php/api.mustache

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,25 @@
2222
{{#operations}}
2323
class {{classname}} {
2424
25-
function __construct($apiClient) {
26-
$this->apiClient = $apiClient;
27-
}
25+
function __construct($apiClient) {
26+
$this->apiClient = $apiClient;
27+
}
2828

2929
{{#operation}}
30-
/**
31-
* {{{nickname}}}
30+
/**
31+
* {{{nickname}}}
3232
*
33-
* {{{summary}}}
33+
* {{{summary}}}
3434
*
3535
{{#allParams}} * @param {{dataType}} ${{paramName}} {{description}} {{^optional}}(required){{/optional}}{{#optional}}(optional){{/optional}}
3636
{{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
37-
*/
37+
*/
3838
public function {{nickname}}({{#allParams}}${{paramName}}{{#optional}}=null{{/optional}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {
3939
40-
// parse inputs
41-
$resourcePath = "{{path}}";
42-
$resourcePath = str_replace("{format}", "json", $resourcePath);
43-
$method = "{{httpMethod}}";
40+
// parse inputs
41+
$resourcePath = "{{path}}";
42+
$resourcePath = str_replace("{format}", "json", $resourcePath);
43+
$method = "{{httpMethod}}";
4444
$queryParams = array();
4545
$headerParams = array();
4646
$formParams = array();
@@ -49,17 +49,17 @@ class {{classname}} {
4949
5050
{{#queryParams}}// query params
5151
if(${{paramName}} !== null) {
52-
$queryParams['{{baseName}}'] = $this->apiClient->toQueryValue(${{paramName}});
53-
}{{/queryParams}}
52+
$queryParams['{{baseName}}'] = $this->apiClient->toQueryValue(${{paramName}});
53+
}{{/queryParams}}
5454
{{#headerParams}}// header params
5555
if(${{paramName}} !== null) {
56-
$headerParams['{{baseName}}'] = $this->apiClient->toHeaderValue(${{paramName}});
57-
}{{/headerParams}}
56+
$headerParams['{{baseName}}'] = $this->apiClient->toHeaderValue(${{paramName}});
57+
}{{/headerParams}}
5858
{{#pathParams}}// path params
5959
if(${{paramName}} !== null) {
60-
$resourcePath = str_replace("{" . "{{baseName}}" . "}",
61-
$this->apiClient->toPathValue(${{paramName}}), $resourcePath);
62-
}{{/pathParams}}
60+
$resourcePath = str_replace("{" . "{{baseName}}" . "}",
61+
$this->apiClient->toPathValue(${{paramName}}), $resourcePath);
62+
}{{/pathParams}}
6363
{{#formParams}}// form params
6464
if (${{paramName}} !== null) {
6565
$formParams['{{baseName}}'] = {{#isFile}}'@' . {{/isFile}}$this->apiClient->toFormValue(${{paramName}});
@@ -77,10 +77,10 @@ class {{classname}} {
7777
$body = http_build_query($body);
7878
}
7979

80-
// make the API Call
81-
$response = $this->apiClient->callAPI($resourcePath, $method,
82-
$queryParams, $body,
83-
$headerParams);
80+
// make the API Call
81+
$response = $this->apiClient->callAPI($resourcePath, $method,
82+
$queryParams, $body,
83+
$headerParams);
8484

8585
{{#returnType}}if(! $response) {
8686
return null;

0 commit comments

Comments
 (0)