GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ExceptionHandler::handle()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 2
eloc 3
c 2
b 0
f 0
nc 2
nop 1
dl 0
loc 6
rs 10
1
<?php
2
3
namespace Honeybadger\Handlers;
4
5
use Honeybadger\Contracts\Handler as HandlerContract;
6
use Throwable;
7
8
class ExceptionHandler extends Handler implements HandlerContract
9
{
10
    /**
11
     * @var callable
12
     */
13
    protected $previousHandler;
14
15
    /**
16
     * @return void
17
     */
18
    public function register(): void
19
    {
20
        $this->previousHandler = set_exception_handler([$this, 'handle']);
21
    }
22
23
    /**
24
     * @param  \Throwable  $e
25
     * @return void
26
     *
27
     * @throws \Honeybadger\Exceptions\ServiceException
28
     */
29
    public function handle(Throwable $e): void
30
    {
31
        $this->honeybadger->notify($e);
32
33
        if (is_callable($this->previousHandler)) {
34
            call_user_func($this->previousHandler, $e);
35
        }
36
    }
37
}
38