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