From f53d860c7ae8fb34b1528bfc4657969665118abc Mon Sep 17 00:00:00 2001 From: Lupacescu Eduard Date: Wed, 22 Jan 2020 13:52:56 +0200 Subject: [PATCH] Throwable type --- src/Controllers/RestResponse.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Controllers/RestResponse.php b/src/Controllers/RestResponse.php index 4cc9aa3ea..9f4905998 100644 --- a/src/Controllers/RestResponse.php +++ b/src/Controllers/RestResponse.php @@ -11,6 +11,7 @@ use Illuminate\Http\JsonResponse; use Illuminate\Support\Arr; use Illuminate\Support\Facades\App; +use Throwable; /** * Class RestResponse. @@ -581,7 +582,12 @@ public function getErrors() return $this->errors instanceof Arrayable ? $this->errors->toArray() : $this->errors; } - public function dump(\Exception $exception, $condition) + /** + * @param Throwable $exception + * @param $condition + * @return $this + */ + public function dump(Throwable $exception, $condition) { if ($condition) { $this->debug = true; @@ -599,10 +605,10 @@ public function dump(\Exception $exception, $condition) /** * Debug the log if the environment is local. * - * @param \Exception $exception + * @param Throwable $exception * @return $this */ - public function dumpLocal(\Exception $exception) + public function dumpLocal(Throwable $exception) { return $this->dump($exception, App::environment('production') === false); }