| 1 | <?php |
||
| 12 | class Handler extends ExceptionHandler |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * A list of the exception types that should not be reported. |
||
| 16 | * |
||
| 17 | * @var array |
||
| 18 | */ |
||
| 19 | protected $dontReport = [ |
||
| 20 | HttpException::class, |
||
| 21 | ModelNotFoundException::class, |
||
| 22 | ]; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Report or log an exception. |
||
| 26 | * |
||
| 27 | * This is a great spot to send exceptions to Sentry, Bugsnag, etc. |
||
| 28 | * |
||
| 29 | * @param \Exception $e |
||
| 30 | * @return void |
||
| 31 | */ |
||
| 32 | public function report(Exception $e) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Render an exception into an HTTP response. |
||
| 39 | * |
||
| 40 | * @param \Illuminate\Http\Request $request |
||
| 41 | * @param \Exception $e |
||
| 42 | * @return \Illuminate\Http\Response |
||
| 43 | */ |
||
| 44 | public function render($request, Exception $e) |
||
| 53 | } |
||
| 54 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.