Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot authored and jiannei committed Oct 17, 2023
1 parent e82d955 commit 0a3300e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Support/Traits/ExceptionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ protected function prepareJsonResponse($request, $e)
// 或者是 ajax 请求,header 中包含 X-Requested-With:XMLHttpRequest;
$exceptionConfig = Config::get('response.exception.'.get_class($e));

if (!is_null($exceptionConfig)) return parent::prepareJsonResponse($request, $e);
if (! is_null($exceptionConfig)) {
return parent::prepareJsonResponse($request, $e);
}

/** @var \Illuminate\Foundation\Exceptions\Handler $this */
$isHttpException = $this->isHttpException($e);
Expand Down Expand Up @@ -83,7 +85,7 @@ protected function invalidJson($request, ValidationException $exception)
{
$exceptionConfig = Config::get('response.exception.'.ValidationException::class);

return !is_null($exceptionConfig) ? Response::fail(
return ! is_null($exceptionConfig) ? Response::fail(
$exception->validator->errors()->first(),
Arr::get($exceptionConfig, 'code', 422),
$exception->errors()
Expand Down

0 comments on commit 0a3300e

Please sign in to comment.