MonitorExceptionHandler   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A report() 0 14 4
1
<?php
2
3
namespace Adriandmitroca\LaravelExceptionMonitor;
4
5
use Exception;
6
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
7
use Illuminate\Http\Request;
8
9
class MonitorExceptionHandler extends ExceptionHandler
10
{
11
    
12
    /**
13
     * Report or log an exception.
14
     *
15
     * @param  \Exception $e
16
     *
17
     */
18
    public function report(Exception $e)
19
    {
20
        foreach ($this->dontReport as $type) {
21
            if ($e instanceof $type) {
22
                return parent::report($e);
23
            }
24
        }
25
26
        if (app()->bound('exception-monitor')) {
27
            app('exception-monitor')->notifyException($e);
28
        }
29
30
        return parent::report($e);
31
    }
32
}