Completed
Push — master ( 282f78...6dce89 )
by Sam
05:20
created

ServerExceptionEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/*
3
 * This file is part of PHP DNS Server.
4
 *
5
 * (c) Yif Swery <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace yswery\DNS\Event;
12
13
use Symfony\Component\EventDispatcher\Event;
14
15
class ServerExceptionEvent extends Event
16
{
17
    /**
18
     * @var \Exception
19
     */
20
    private $exception;
21
22
    /**
23
     * ExceptionEvent constructor.
24
     *
25
     * @param \Exception $exception
26
     */
27
    public function __construct(\Exception $exception)
28
    {
29
        $this->exception = $exception;
30
    }
31
32
    /**
33
     * @return \Exception
34
     */
35
    public function getException(): \Exception
36
    {
37
        return $this->exception;
38
    }
39
}
40