Passed
Push — master ( ed3a21...c78a04 )
by Guido
06:24
created

ThrowableFiredEvent::isDevMode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
c 1
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Gvera\Events;
4
5
use Gvera\Helpers\http\HttpResponse;
6
7
/**
8
 * Event Class Doc Comment
9
 *
10
 * @category Class
11
 * @package  src/events
12
 * @author    Guido Vera
13
 * @license  http://www.gnu.org/copyleft/gpl.html GNU General Public License
14
 * @link     http://www.github.com/veraguido/gv
15
 *
16
 */
17
class ThrowableFiredEvent extends Event
18
{
19
    const THROWABLE_FIRED_EVENT = 'throwable_fired_event';
20
    protected $throwable;
21
    protected $devMode;
22
    protected $httpResponse;
23
24
    public function __construct(\Throwable $throwable, $devMode, HttpResponse $httpResponse)
25
    {
26
        $this->throwable = $throwable;
27
        $this->devMode = $devMode;
28
        $this->httpResponse = $httpResponse;
29
    }
30
31
    /**
32
     * @return \Throwable
33
     */
34
    public function getThrowable(): \Throwable
35
    {
36
        return $this->throwable;
37
    }
38
39
    /**
40
     * @return bool
41
     */
42
    public function isDevMode(): bool
43
    {
44
        return $this->devMode;
45
    }
46
47
    /**
48
     * Get the value of httpResponse
49
     */
50
    public function getHttpResponse()
51
    {
52
        return $this->httpResponse;
53
    }
54
}
55