From b376d3e77940c7a26587c7a7c972619bf5a4e85e Mon Sep 17 00:00:00 2001 From: Danny Dinges Date: Fri, 23 Aug 2024 09:13:52 -0700 Subject: [PATCH] Add RedirectResponse type for render() on BanhammerException. When using the ban.fallback_url the response is a RedirectResponse but the method return type only accepts Response. --- src/Exceptions/BanhammerException.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Exceptions/BanhammerException.php b/src/Exceptions/BanhammerException.php index 21ad698..8d41fb9 100644 --- a/src/Exceptions/BanhammerException.php +++ b/src/Exceptions/BanhammerException.php @@ -3,6 +3,7 @@ namespace Mchev\Banhammer\Exceptions; use Exception; +use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Support\Facades\Log; @@ -26,7 +27,7 @@ public function report(): void /** * Render the exception into an HTTP response. */ - public function render(Request $request): Response + public function render(Request $request): Response|RedirectResponse { return (config('ban.fallback_url')) ? redirect(config('ban.fallback_url'))