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