| Total Complexity | 4 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | class JsonRpcException extends \Exception implements JsonRpcExceptionInterface |
||
| 14 | { |
||
| 15 | /** @var array */ |
||
| 16 | private $data; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param int $code |
||
| 20 | * @param string $message |
||
| 21 | * @param array $data |
||
| 22 | */ |
||
| 23 | 39 | public function __construct(int $code, string $message = '', array $data = [], ?\Throwable $previous = null) |
|
| 24 | { |
||
| 25 | 39 | $this->data = $data; |
|
| 26 | |||
| 27 | 39 | parent::__construct($message, $code, $previous); |
|
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * {@inheritdoc} |
||
| 32 | */ |
||
| 33 | 35 | public function getErrorCode() : int |
|
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | 35 | public function getErrorMessage() : string |
|
| 42 | { |
||
| 43 | 35 | return parent::getMessage(); |
|
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritdoc} |
||
| 48 | */ |
||
| 49 | 35 | public function getErrorData() : array |
|
| 52 | } |
||
| 53 | } |
||
| 54 |