| Total Complexity | 2 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class ExceptionHandler |
||
| 14 | { |
||
| 15 | use JsonRpcServerDispatcherAwareTrait; |
||
| 16 | |||
| 17 | /** @var ResponseCreator */ |
||
| 18 | private $responseCreator; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param ResponseCreator $responseCreator |
||
| 22 | */ |
||
| 23 | 4 | public function __construct(ResponseCreator $responseCreator) |
|
| 24 | { |
||
| 25 | 4 | $this->responseCreator = $responseCreator; |
|
| 26 | 4 | } |
|
| 27 | |||
| 28 | /** |
||
| 29 | * @param \Exception $exception |
||
| 30 | * |
||
| 31 | * @return JsonRpcResponse |
||
| 32 | */ |
||
| 33 | 4 | public function getJsonRpcResponseFromException(\Exception $exception, JsonRpcRequest $fromRequest = null) : JsonRpcResponse |
|
| 39 | } |
||
| 40 | } |
||
| 41 |