Total Complexity | 4 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
7 | class JsonRpcCallResponse |
||
8 | { |
||
9 | /** @var bool */ |
||
10 | private $isBatch; |
||
11 | /** @var JsonRpcResponse[] */ |
||
12 | private $responseList = []; |
||
13 | |||
14 | /** |
||
15 | * @param bool $isBatch |
||
16 | */ |
||
17 | 45 | public function __construct(bool $isBatch = false) |
|
18 | { |
||
19 | 45 | $this->isBatch = $isBatch; |
|
20 | } |
||
21 | |||
22 | /** |
||
23 | * @param JsonRpcResponse $response |
||
24 | * |
||
25 | * @return self |
||
26 | */ |
||
27 | 44 | public function addResponse(JsonRpcResponse $response) : self |
|
28 | { |
||
29 | 44 | $this->responseList[] = $response; |
|
30 | |||
31 | 44 | return $this; |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * @return boolean |
||
36 | */ |
||
37 | 40 | public function isBatch() : bool |
|
38 | { |
||
39 | 40 | return $this->isBatch; |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return JsonRpcResponse[] |
||
44 | */ |
||
45 | 44 | public function getResponseList() : array |
|
48 | } |
||
49 | } |
||
50 |