Handler   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 48
c 2
b 0
f 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A report() 0 15 2
A render() 0 4 1
1
<?php namespace App\Exceptions;
2
3
use Exception;
4
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
5
6
class Handler extends ExceptionHandler {
7
8
	/**
9
	 * A list of the exception types that should not be reported.
10
	 *
11
	 * @var array
12
	 */
13
	protected $dontReport = [
14
		'Symfony\Component\HttpKernel\Exception\HttpException'
15
	];
16
17
	/**
18
	 * Report or log an exception.
19
	 *
20
	 * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
21
	 *
22
	 * @param  \Exception  $e
23
	 * @return void
24
	 */
25
	public function report(Exception $e)
26
	{
27
		// some quick data about the error for local development
28
		if (\App::environment('local')) {
29
			
30
			die(
0 ignored issues
show
Coding Style Compatibility introduced by
The method report() contains an exit expression.

An exit expression should only be used in rare cases. For example, if you write a short command line script.

In most cases however, using an exit expression makes the code untestable and often causes incompatibilities with other libraries. Thus, unless you are absolutely sure it is required here, we recommend to refactor your code to avoid its usage.

Loading history...
31
				"File: " . $e->getFile() . 
32
				"\nLine: " . $e->getLine() . 
33
				"\nMessage: " . $e->getMessage() . 
34
				"\n\nTrace:\n" . substr($e->getTraceAsString(), 0, 25000)
35
			);
36
		}
37
38
		return parent::report($e);
39
	}
40
41
	/**
42
	 * Render an exception into an HTTP response.
43
	 *
44
	 * @param  \Illuminate\Http\Request  $request
45
	 * @param  \Exception  $e
46
	 * @return \Illuminate\Http\Response
47
	 */
48
	public function render($request, Exception $e)
49
	{
50
		return parent::render($request, $e);
51
	}
52
53
}
54