Passed
Pull Request — master (#9)
by Pavel
11:27
created

GetExceptionResponseEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
dl 0
loc 25
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1
ccs 6
cts 9
cp 0.6667
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getException() 0 4 1
A setException() 0 4 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