ApplicationExceptionEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 3
c 3
b 0
f 0
lcom 0
cbo 1
dl 0
loc 43
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getApplication() 0 4 1
A getException() 0 4 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 Nette\Application\Application;
11
use Symfony\Component\EventDispatcher\Event;
12
13
14
final class ApplicationExceptionEvent extends Event
15
{
16
17
	/**
18
	 * @var Application
19
	 */
20
	private $application;
21
22
	/**
23
	 * @var \Throwable|\Exception|NULL
24
	 */
25
	private $exception;
26
27
28
	/**
29
	 * @param Application $application
30
	 * @param \Throwable|\Exception|NULL $exception
31
	 */
32 5
	public function __construct(Application $application, $exception = NULL)
33
	{
34 5
		$this->application = $application;
35 5
		$this->exception = $exception;
36 5
	}
37
38
39
	/**
40
	 * @return Application
41
	 */
42 1
	public function getApplication()
43
	{
44 1
		return $this->application;
45
	}
46
47
48
	/**
49
	 * @return \Throwable|\Exception|NULL
50
	 */
51 1
	public function getException()
52
	{
53 1
		return $this->exception;
54
	}
55
56
}
57