Completed
Push — develop ( 2f90e1...bffb25 )
by Kirill
07:59
created

GitterHandler   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A fire() 0 6 2
1
<?php
2
/**
3
 * This file is part of GitterBot package.
4
 *
5
 * @author Serafim <[email protected]>
6
 * @date 28.01.2016 16:27
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
namespace App\Exceptions;
12
13
use Gitter\Handlers\DebugErrorHandler;
14
use Gitter\Handlers\ErrorHandlerInterface;
15
16
/**
17
 * Class GitterHandler
18
 * @package App\Exceptions
19
 */
20
class GitterHandler implements ErrorHandlerInterface
21
{
22
    /**
23
     * @var DebugErrorHandler
24
     */
25
    protected $debugHandler;
26
27
    /**
28
     * GitterHandler constructor.
29
     */
30
    public function __construct()
31
    {
32
        $this->debugHandler = new DebugErrorHandler();
33
    }
34
35
    /**
36
     * @param \Throwable $e
37
     */
38
    public function fire(\Throwable $e)
39
    {
40
        if (app()->isLocal()) {
41
            $this->debugHandler->fire($e);
42
        }
43
    }
44
}
45