xoco70 /
kendozone
| 1 | <?php |
||||||
| 2 | |||||||
| 3 | namespace App\Exceptions; |
||||||
| 4 | |||||||
| 5 | use Exception; |
||||||
| 6 | use Illuminate\Support\Facades\Auth; |
||||||
| 7 | |||||||
| 8 | class CustomException extends \Exception |
||||||
| 9 | { |
||||||
| 10 | protected $sentryID; |
||||||
| 11 | |||||||
| 12 | public function report(Exception $exception) |
||||||
| 13 | { |
||||||
| 14 | if ($this->shouldReport($exception)) { |
||||||
|
0 ignored issues
–
show
|
|||||||
| 15 | $params = []; |
||||||
| 16 | if (Auth::check()) { |
||||||
| 17 | $params = [ |
||||||
| 18 | 'user' => [ |
||||||
| 19 | 'id' => Auth::user()->id, |
||||||
| 20 | 'email' => Auth::user()->email |
||||||
| 21 | ], |
||||||
| 22 | ]; |
||||||
| 23 | } |
||||||
| 24 | |||||||
| 25 | $this->sentryID = app('sentry')->captureException($exception, $params); |
||||||
| 26 | } |
||||||
| 27 | parent::report($exception); |
||||||
|
0 ignored issues
–
show
The method
report() does not exist on Exception. It seems like you code against a sub-type of Exception such as App\Exceptions\CustomException.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 28 | } |
||||||
| 29 | } |
||||||
| 30 |
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.