mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 11:23:58 +00:00
Replaced \n with PHP_EOL
This commit is contained in:
parent
e687ad5823
commit
041c5d1d34
@ -211,7 +211,7 @@ class ApiClient
|
||||
|
||||
// debugging for curl
|
||||
if ($this->config->getDebug()) {
|
||||
error_log("[DEBUG] HTTP Request body ~BEGIN~\n".print_r($postData, true)."\n~END~\n", 3, $this->config->getDebugFile());
|
||||
error_log("[DEBUG] HTTP Request body ~BEGIN~".PHP_EOL.print_r($postData, true).PHP_EOL."~END~".PHP_EOL, 3, $this->config->getDebugFile());
|
||||
|
||||
curl_setopt($curl, CURLOPT_VERBOSE, 1);
|
||||
curl_setopt($curl, CURLOPT_STDERR, fopen($this->config->getDebugFile(), 'a'));
|
||||
@ -231,7 +231,7 @@ class ApiClient
|
||||
|
||||
// debug HTTP response body
|
||||
if ($this->config->getDebug()) {
|
||||
error_log("[DEBUG] HTTP Response body ~BEGIN~\n".print_r($http_body, true)."\n~END~\n", 3, $this->config->getDebugFile());
|
||||
error_log("[DEBUG] HTTP Response body ~BEGIN~".PHP_EOL.print_r($http_body, true).PHP_EOL."~END~".PHP_EOL, 3, $this->config->getDebugFile());
|
||||
}
|
||||
|
||||
// Handle the response
|
||||
|
@ -271,7 +271,7 @@ class ObjectSerializer
|
||||
$byte_written = $deserialized->fwrite($data);
|
||||
|
||||
if (Configuration::getDefaultConfiguration()->getDebug()) {
|
||||
error_log("[DEBUG] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.\n", 3, Configuration::getDefaultConfiguration()->getDebugFile());
|
||||
error_log("[DEBUG] Written $byte_written byte to $filename. Please move the file to a proper folder or delete the temp file after processing.".PHP_EOL, 3, Configuration::getDefaultConfiguration()->getDebugFile());
|
||||
}
|
||||
|
||||
return $deserialized;
|
||||
|
@ -82,7 +82,7 @@ try {
|
||||
{{#returnType}}$result = {{/returnType}}$api_instance->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||
print_r($result);{{/returnType}}
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), "\n";
|
||||
echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}}
|
||||
?>
|
||||
|
@ -41,7 +41,7 @@ try {
|
||||
{{#returnType}}$result = {{/returnType}}$api_instance->{{{operationId}}}({{#allParams}}${{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||
print_r($result);{{/returnType}}
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), "\n";
|
||||
echo 'Exception when calling {{classname}}->{{operationId}}: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
?>
|
||||
```
|
||||
|
@ -513,12 +513,12 @@ class Configuration
|
||||
*/
|
||||
public static function toDebugReport()
|
||||
{
|
||||
$report = "PHP SDK ({{invokerPackage}}) Debug Report:\n";
|
||||
$report .= " OS: ".php_uname()."\n";
|
||||
$report .= " PHP Version: ".phpversion()."\n";
|
||||
$report .= " OpenAPI Spec Version: {{version}}\n";
|
||||
$report .= " SDK Package Version: {{artifactVersion}}\n";
|
||||
$report .= " Temp Folder Path: ".self::getDefaultConfiguration()->getTempFolderPath()."\n";
|
||||
$report = "PHP SDK ({{invokerPackage}}) Debug Report:".PHP_EOL;
|
||||
$report .= " OS: ".php_uname().PHP_EOL;
|
||||
$report .= " PHP Version: ".phpversion().PHP_EOL;
|
||||
$report .= " OpenAPI Spec Version: {{version}}".PHP_EOL;
|
||||
$report .= " SDK Package Version: {{artifactVersion}}".PHP_EOL;
|
||||
$report .= " Temp Folder Path: ".self::getDefaultConfiguration()->getTempFolderPath().PHP_EOL;
|
||||
|
||||
return $report;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user