Handler   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 7
c 1
b 0
f 0
dl 0
loc 46
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 3 1
A report() 0 3 1
1
<?php
2
/**
3
 * Exception Handler.
4
 *
5
 * @package App\Exceptions
6
 *
7
 * @author    Taylor Otwell <[email protected]>
8
 * @copyright 2018-2020 Nick Menke
9
 *
10
 * @link https://github.com/nlmenke/vertebrae
11
 */
12
13
declare(strict_types=1);
14
15
namespace App\Exceptions;
16
17
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
18
use Illuminate\Http\Request;
19
use Symfony\Component\HttpFoundation\Response;
20
use Throwable;
21
22
/**
23
 * The exception handler class.
24
 *
25
 * This class handles exceptions thrown by the application.
26
 *
27
 * @since 0.0.0-framework introduced
28
 */
29
class Handler extends ExceptionHandler
30
{
31
    /**
32
     * A list of the inputs that are never flashed for validation exceptions.
33
     *
34
     * @var array
35
     */
36
    protected $dontFlash = [
37
        'password',
38
        'password_confirmation',
39
    ];
40
41
    /**
42
     * A list of the exception types that are not reported.
43
     *
44
     * @var array
45
     */
46
    protected $dontReport = [];
47
48
    /**
49
     * Render an exception into an HTTP response.
50
     *
51
     * @param Request   $request
52
     * @param Throwable $exception
53
     *
54
     * @throws Throwable
55
     *
56
     * @return Response
57
     */
58 8
    public function render($request, Throwable $exception)
59
    {
60 8
        return parent::render($request, $exception);
61
    }
62
63
    /**
64
     * Report or log an exception.
65
     *
66
     * @param Throwable $exception
67
     *
68
     * @throws Throwable
69
     *
70
     * @return void
71
     */
72 8
    public function report(Throwable $exception): void
73
    {
74 8
        parent::report($exception);
75 8
    }
76
}
77