1 | <?php |
||
5 | final class JsonRpcError implements JsonRpcErrorInterface |
||
6 | { |
||
7 | /** @var int */ |
||
8 | private $code; |
||
9 | /** @var string */ |
||
10 | private $message; |
||
11 | /** @var null|\stdClass */ |
||
12 | private $data; |
||
13 | |||
14 | /** |
||
15 | * JsonRpcError constructor. |
||
16 | * @param int $code |
||
17 | * @param string $message |
||
18 | * @param \stdClass|mixed|null $data |
||
19 | */ |
||
20 | 4 | public function __construct($code, $message, $data = null) |
|
26 | |||
27 | /** {@inheritdoc} */ |
||
28 | 4 | public function getCode() |
|
32 | |||
33 | /** {@inheritdoc} */ |
||
34 | 4 | public function getMessage() |
|
38 | |||
39 | /** {@inheritdoc} */ |
||
40 | 2 | public function getData() |
|
44 | |||
45 | /** {@inheritdoc} */ |
||
46 | 2 | public function jsonSerialize() |
|
59 | } |
||
60 |