| 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 (JsonRpcRequest|\Exception)[] */ | ||
| 12 | private $itemList = []; | ||
| 13 | |||
| 14 | /** | ||
| 15 | * @param bool $isBatch | ||
| 16 | */ | ||
| 17 | 34 | public function __construct(bool $isBatch = false) | |
| 20 | } | ||
| 21 | |||
| 22 | /** | ||
| 23 | * @param JsonRpcRequest $item | ||
| 24 | * | ||
| 25 | * @return self | ||
| 26 | */ | ||
| 27 | 22 | public function addRequestItem(JsonRpcRequest $item) : self | |
| 28 |     { | ||
| 29 | 22 | $this->itemList[] = $item; | |
| 30 | |||
| 31 | 22 | return $this; | |
| 32 | } | ||
| 33 | |||
| 34 | /** | ||
| 35 | * @param \Exception $item | ||
| 36 | * | ||
| 37 | * @return self | ||
| 38 | */ | ||
| 39 | 6 | public function addExceptionItem(\Exception $item) : self | |
| 40 |     { | ||
| 41 | 6 | $this->itemList[] = $item; | |
| 42 | |||
| 43 | 6 | return $this; | |
| 44 | } | ||
| 45 | |||
| 46 | /** | ||
| 47 | * @return bool | ||
| 48 | */ | ||
| 49 | 33 | public function isBatch() : bool | |
| 52 | } | ||
| 53 | |||
| 54 | /** | ||
| 55 | * @return (JsonRpcRequest|\Exception)[] | ||
| 56 | */ | ||
| 57 | 25 | public function getItemList() : array | |
| 60 | } | ||
| 61 | } | ||
| 62 |