Handler::report()   A
last analyzed

Complexity

Conditions 3
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 3
nc 2
nop 1
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Exceptions;
4
5
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
6
use Illuminate\Support\Facades\App;
7
use LaravelEnso\Helpers\Exceptions\EnsoException;
8
use LaravelEnso\Sentry\Exceptions\Handler as Sentry;
9
use Throwable;
10
11
class Handler extends ExceptionHandler
12
{
13
    protected $dontReport = [
14
        EnsoException::class,
15
    ];
16
17
    protected $dontFlash = [
18
        'password', 'password_confirmation',
19
    ];
20
21
    public function report(Throwable $exception)
22
    {
23
        if (App::bound('sentry') && $this->shouldReport($exception)) {
24
            Sentry::report($exception);
25
        }
26
27
        parent::report($exception);
28
    }
29
30
    // public function register()
31
    // {
32
    //     $this->reportable(function (Throwable $e) {
33
    //
34
    //     });
35
    // }
36
}
37