Issues (350)

app/Exceptions/Handler.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace App\Exceptions;
4
5
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
6
use Throwable;
7
8
class Handler extends ExceptionHandler
9
{
10
    /**
11
     * A list of the inputs that are never flashed for validation exceptions.
12
     *
13
     * @var array
14
     */
15
    protected $dontFlash = [
16
        'password',
17
        'password_confirmation',
18
    ];
19
20
    /**
21
     * Report or log an exception.
22
     *
23
     * @return void
24
     */
25
    public function report(Throwable $exception)
26
    {
27
        if (app()->bound('sentry') && $this->shouldReport($exception)) {
28
            app('sentry')->captureException($exception);
0 ignored issues
show
The method captureException() does not exist on Illuminate\Contracts\Foundation\Application. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
            app('sentry')->/** @scrutinizer ignore-call */ captureException($exception);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
29
        }
30
31
        parent::report($exception);
32
    }
33
}
34