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