Skip to content

Commit f53d860

Browse files
committed
Throwable type
1 parent d2ae7b7 commit f53d860

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/Controllers/RestResponse.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Illuminate\Http\JsonResponse;
1212
use Illuminate\Support\Arr;
1313
use Illuminate\Support\Facades\App;
14+
use Throwable;
1415

1516
/**
1617
* Class RestResponse.
@@ -581,7 +582,12 @@ public function getErrors()
581582
return $this->errors instanceof Arrayable ? $this->errors->toArray() : $this->errors;
582583
}
583584

584-
public function dump(\Exception $exception, $condition)
585+
/**
586+
* @param Throwable $exception
587+
* @param $condition
588+
* @return $this
589+
*/
590+
public function dump(Throwable $exception, $condition)
585591
{
586592
if ($condition) {
587593
$this->debug = true;
@@ -599,10 +605,10 @@ public function dump(\Exception $exception, $condition)
599605
/**
600606
* Debug the log if the environment is local.
601607
*
602-
* @param \Exception $exception
608+
* @param Throwable $exception
603609
* @return $this
604610
*/
605-
public function dumpLocal(\Exception $exception)
611+
public function dumpLocal(Throwable $exception)
606612
{
607613
return $this->dump($exception, App::environment('production') === false);
608614
}

0 commit comments

Comments
 (0)