diff --git a/src/Events/ExceptionHandling.php b/src/Events/ExceptionHandling.php index 93233cc..115c7bb 100644 --- a/src/Events/ExceptionHandling.php +++ b/src/Events/ExceptionHandling.php @@ -2,18 +2,20 @@ namespace JKocik\Laravel\Profiler\Events; +use Throwable; + class ExceptionHandling { /** - * @var mixed + * @var Throwable */ public $exception; /** * ExceptionHandling constructor. - * @param $exception + * @param Throwable $exception */ - public function __construct($exception) + public function __construct(Throwable $exception) { $this->exception = $exception; } diff --git a/src/LaravelListeners/ExceptionListener.php b/src/LaravelListeners/ExceptionListener.php index 532b118..89a6f36 100644 --- a/src/LaravelListeners/ExceptionListener.php +++ b/src/LaravelListeners/ExceptionListener.php @@ -2,7 +2,7 @@ namespace JKocik\Laravel\Profiler\LaravelListeners; -use Exception; +use Throwable; use Illuminate\Support\Facades\Event; use JKocik\Laravel\Profiler\Events\ExceptionHandling; use JKocik\Laravel\Profiler\Contracts\LaravelListener; @@ -10,7 +10,7 @@ class ExceptionListener implements LaravelListener { /** - * @var mixed + * @var Throwable */ protected $exception; @@ -24,10 +24,7 @@ public function listen(): void }); } - /** - * @return mixed - */ - public function exception() + public function exception(): ?Throwable { return $this->exception; }