| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 53 | private function normalizeError(JsonRpcExceptionInterface $error) |
||
| 54 | { |
||
| 55 | $normalizedError = [ |
||
| 56 | self::SUB_KEY_ERROR_CODE => $error->getErrorCode(), |
||
| 57 | self::SUB_KEY_ERROR_MESSAGE => $error->getErrorMessage() |
||
| 58 | ]; |
||
| 59 | |||
| 60 | if ($error->getErrorData()) { |
||
| 61 | $normalizedError[self::SUB_KEY_ERROR_DATA] = $error->getErrorData(); |
||
| 62 | } |
||
| 63 | |||
| 64 | return $normalizedError; |
||
| 65 | } |
||
| 67 |