Completed
Pull Request — master (#5)
by Šimon
20:27
created

ApplicationExceptionEvent::getThrowable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/**
4
 * This file is part of Symnedi.
5
 * Copyright (c) 2014 Tomas Votruba (http://tomasvotruba.cz)
6
 */
7
8
namespace Symnedi\EventDispatcher\Event;
9
10
use Throwable;
11
use Nette\Application\Application;
12
use Symfony\Component\EventDispatcher\Event;
13
14
15
final class ApplicationExceptionEvent extends Event
16
{
17
18
	/**
19
	 * @var Application
20
	 */
21
	private $application;
22
23
	/**
24
	 * @var Throwable
25
	 */
26
	private $throwable;
27
28
29 5
	public function __construct(Application $application, Throwable $throwable = NULL)
30
	{
31 5
		$this->application = $application;
32 5
		$this->throwable   = $throwable;
33 5
	}
34
35
36
	/**
37
	 * @return Application
38
	 */
39 1
	public function getApplication()
40
	{
41 1
		return $this->application;
42
	}
43
44
45
	/**
46
	 * @return Exception
47
	 */
48 1
	public function getThrowable()
49
	{
50 1
		return $this->throwable;
51
	}
52
53
}
54