chore: reformat code.

This commit is contained in:
James Cole
2023-06-21 12:34:58 +02:00
parent 8d87abde64
commit 3dcb35710b
799 changed files with 23319 additions and 22173 deletions

View File

@@ -72,8 +72,8 @@ class Handler extends ExceptionHandler
/**
* Render an exception into an HTTP response.
*
* @param Request $request
* @param Throwable $e
* @param Request $request
* @param Throwable $e
*
* @return mixed
* @throws Throwable
@@ -176,7 +176,7 @@ class Handler extends ExceptionHandler
/**
* Report or log an exception.
*
* @param Throwable $e
* @param Throwable $e
*
* @return void
* @throws Throwable
@@ -225,15 +225,32 @@ class Handler extends ExceptionHandler
parent::report($e);
}
/**
* @param Throwable $e
*
* @return bool
*/
private function shouldntReportLocal(Throwable $e): bool
{
return !is_null(
Arr::first(
$this->dontReport,
function ($type) use ($e) {
return $e instanceof $type;
}
)
);
}
/**
* Convert a validation exception into a response.
*
* @param Request $request
* @param LaravelValidationException $exception
* @param Request $request
* @param LaravelValidationException $exception
*
* @return Application|RedirectResponse|Redirector
*/
protected function invalid($request, LaravelValidationException $exception): Application|RedirectResponse|Redirector
protected function invalid($request, LaravelValidationException $exception): Application | RedirectResponse | Redirector
{
// protect against open redirect when submitting invalid forms.
$previous = app('steam')->getSafePreviousUrl();
@@ -247,7 +264,7 @@ class Handler extends ExceptionHandler
/**
* Only return the redirectTo property from the exception if it is a valid URL. Return NULL otherwise.
*
* @param LaravelValidationException $exception
* @param LaravelValidationException $exception
*
* @return string|null
*/
@@ -263,21 +280,4 @@ class Handler extends ExceptionHandler
return null !== $previousHost && $previousHost === $safeHost ? $previous : $safe;
}
/**
* @param Throwable $e
*
* @return bool
*/
private function shouldntReportLocal(Throwable $e): bool
{
return !is_null(
Arr::first(
$this->dontReport,
function ($type) use ($e) {
return $e instanceof $type;
}
)
);
}
}