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

RpcResponseEvent::setResponse()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: batanov.pavel
5
 * Date: 17.05.2016
6
 * Time: 8:44
7
 */
8
9
namespace Bankiru\Api\Rpc\Event;
10
11
use Bankiru\Api\Rpc\RpcEvent;
12
use ScayTrase\Api\Rpc\RpcResponseInterface;
13
14
class RpcResponseEvent extends RpcEvent
15
{
16
    /** @var  RpcResponseInterface|null */
17
    protected $response;
18
19
    /** @return bool */
20 7
    public function hasResponse()
21
    {
22 7
        return null !== $this->response;
23
    }
24
25
    /** @return RpcResponseInterface */
26
    public function getResponse()
27
    {
28
        return $this->response;
29
    }
30
31
    /**
32
     * @param RpcResponseInterface $response
33
     */
34
    public function setResponse(RpcResponseInterface $response)
35
    {
36
        $this->response = $response;
37
    }
38
}
39