Completed
Push — master ( 055f1b...f72a4b )
by Pavel
52s
created

RpcEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
crap 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: batanov.pavel
5
 * Date: 12.02.2016
6
 * Time: 9:31
7
 */
8
9
namespace Bankiru\Api\Rpc;
10
11
use Bankiru\Api\Rpc\Http\RequestInterface;
12
use Symfony\Component\EventDispatcher\Event;
13
use Symfony\Component\HttpKernel\HttpKernelInterface;
14
15
class RpcEvent extends Event
16
{
17
    /** @var  HttpKernelInterface */
18
    private $kernel;
19
    /** @var  RequestInterface */
20
    private $request;
21
22
    /**
23
     * RpcEvent constructor.
24
     *
25
     * @param HttpKernelInterface  $kernel
26
     * @param RequestInterface $request
27
     */
28 7
    public function __construct(HttpKernelInterface $kernel, RequestInterface $request)
29
    {
30 7
        $this->kernel  = $kernel;
31 7
        $this->request = $request;
32 7
    }
33
34
    /**
35
     * @return HttpKernelInterface
36
     */
37
    public function getKernel()
38
    {
39
        return $this->kernel;
40
    }
41
42
    /**
43
     * @return RequestInterface
44
     */
45 7
    public function getRequest()
46
    {
47 7
        return $this->request;
48
    }
49
}
50