| Total Complexity | 8 |
| Total Lines | 90 |
| Duplicated Lines | 0 % |
| Coverage | 81.82% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class Handler extends ExceptionHandler |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * A list of the exception types that are not reported. |
||
| 16 | * |
||
| 17 | * @var array |
||
|
|
|||
| 18 | */ |
||
| 19 | protected $dontReport = [ |
||
| 20 | // |
||
| 21 | ]; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * A list of the inputs that are never flashed for validation exceptions. |
||
| 25 | * |
||
| 26 | * @var array |
||
| 27 | */ |
||
| 28 | protected $dontFlash = [ |
||
| 29 | 'password', |
||
| 30 | 'password_confirmation', |
||
| 31 | 'old_password', |
||
| 32 | 'new_password', |
||
| 33 | 'new_password_confirmation', |
||
| 34 | ]; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Report or log an exception. |
||
| 38 | * |
||
| 39 | * @param \Exception $exception |
||
|
2 ignored issues
–
show
|
|||
| 40 | * @return void |
||
| 41 | */ |
||
| 42 | 4 | public function report(Exception $exception) |
|
| 45 | 4 | } |
|
| 46 | |||
| 47 | /** |
||
| 48 | * Render an exception into an HTTP response. |
||
| 49 | * |
||
| 50 | * @param \Illuminate\Http\Request $request |
||
|
2 ignored issues
–
show
|
|||
| 51 | * @param \Exception $exception |
||
|
2 ignored issues
–
show
|
|||
| 52 | * @return \Illuminate\Http\Response |
||
| 53 | */ |
||
| 54 | 4 | public function render($request, Exception $exception) |
|
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Convert an authentication exception into an unauthenticated response. |
||
| 64 | * |
||
| 65 | * @param \Illuminate\Http\Request $request |
||
|
2 ignored issues
–
show
|
|||
| 66 | * @param \Illuminate\Auth\AuthenticationException $exception |
||
|
2 ignored issues
–
show
|
|||
| 67 | * @return \Illuminate\Http\Response |
||
| 68 | */ |
||
| 69 | 1 | protected function unauthenticated($request, AuthenticationException $exception) |
|
| 80 | } |
||
| 81 | |||
| 82 | /** |
||
| 83 | * OVERRIDE |
||
| 84 | * Render the given HttpException. |
||
| 85 | * |
||
| 86 | * @param \Symfony\Component\HttpKernel\Exception\HttpException $e |
||
|
2 ignored issues
–
show
|
|||
| 87 | * @return \Symfony\Component\HttpFoundation\Response |
||
| 88 | */ |
||
| 89 | 2 | protected function renderHttpException(HttpException $e) |
|
| 90 | { |
||
| 91 | 2 | if (! view()->exists("errors.{$e->getStatusCode()}")) { |
|
| 92 | 2 | return response()->view('errors.default', [ |
|
| 93 | 2 | 'exception' => $e, |
|
| 94 | 2 | 'goc' => Lang::get('common/goc'), |
|
| 95 | 2 | 'alert' => Lang::get('common/alert'), |
|
| 96 | 'error' => [ |
||
| 97 | "title" => "Error" |
||
| 98 | ] |
||
| 99 | 2 | ], $e->getStatusCode(), $e->getHeaders()); |
|
| 100 | } |
||
| 101 | return parent::renderHttpException($e); |
||
| 102 | } |
||
| 104 |