Passed
Pull Request — master (#9)
by Pavel
12:36
created

GetExceptionResponseEvent::getException()   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 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Bankiru\Api\Rpc\Event;
4
5
use Bankiru\Api\Rpc\RpcRequestInterface;
6
use Symfony\Component\HttpKernel\HttpKernelInterface;
7
8
class GetExceptionResponseEvent extends RpcResponseEvent
9
{
10
    /** @var \Exception */
11
    private $exception;
12
13 5
    public function __construct(HttpKernelInterface $kernel, RpcRequestInterface $request, \Exception $exception)
14
    {
15 5
        parent::__construct($kernel, $request);
16 5
        $this->exception = $exception;
17 5
    }
18
19
    /** @return \Exception */
20 5
    public function getException()
21
    {
22 5
        return $this->exception;
23
    }
24
25
    /**
26
     * @param \Exception $exception
27
     */
28
    public function setException($exception)
29
    {
30
        $this->exception = $exception;
31
    }
32
}
33