Total Complexity | 5 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
9 | class JsonRpcRawRequest |
||
10 | { |
||
11 | /** @var bool */ |
||
12 | private $isBatch; |
||
13 | /** @var mixed[] */ |
||
14 | private $itemList = []; |
||
15 | |||
16 | /** |
||
17 | * @param bool|false $isBatch |
||
18 | */ |
||
19 | public function __construct(bool $isBatch = false) |
||
20 | { |
||
21 | $this->isBatch = $isBatch; |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @param JsonRpcRequest $item |
||
26 | * |
||
27 | * @return JsonRpcRawRequest |
||
28 | */ |
||
29 | public function addRequestItem(JsonRpcRequest $item) : JsonRpcRawRequest |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @param \Exception $item |
||
38 | * |
||
39 | * @return JsonRpcRawRequest |
||
40 | */ |
||
41 | public function addExceptionItem(\Exception $item) : JsonRpcRawRequest |
||
42 | { |
||
43 | $this->itemList[] = $item; |
||
44 | |||
45 | return $this; |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @return boolean |
||
50 | */ |
||
51 | public function isBatch() : bool |
||
52 | { |
||
53 | return $this->isBatch; |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @return (JsonRpcRequest|\Exception)[] |
||
58 | */ |
||
59 | public function getItemtList() : array |
||
62 | } |
||
63 | } |
||
64 |