Applied PHP formatting rules

This commit is contained in:
Bernd Bestel
2020-08-31 20:40:31 +02:00
parent 33325d5560
commit d4c5da2173
58 changed files with 3667 additions and 3082 deletions

View File

@@ -27,16 +27,18 @@ class ExceptionController extends BaseApiController
$response = $this->app->getResponseFactory()->createResponse();
$isApiRoute = string_starts_with($request->getUri()->getPath(), '/api/');
if ($isApiRoute)
{
$status = 500;
if ($exception instanceof HttpException)
{
$status = $exception->getCode();
}
$data = [
'error_message' => $exception->getMessage(),
'error_message' => $exception->getMessage()
];
if ($displayErrorDetails)
@@ -44,7 +46,7 @@ class ExceptionController extends BaseApiController
$data['error_details'] = [
'stack_trace' => $exception->getTraceAsString(),
'file' => $exception->getFile(),
'line' => $exception->getLine(),
'line' => $exception->getLine()
];
}
@@ -71,4 +73,5 @@ class ExceptionController extends BaseApiController
'exception' => $exception
]);
}
}