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