Conditions | 5 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 5 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | 4 | public function applyResponse(HttpRequestInterface $request, HttpResponseInterface $response, array $options) |
|
32 | { |
||
33 | 4 | if ($response instanceof ResponseInterface && |
|
34 | 4 | isset($options['rpc_error']) && |
|
35 | 4 | true === $options['rpc_error'] && |
|
36 | 3 | null !== $response->getRpcErrorCode() |
|
37 | 4 | ) { |
|
38 | 2 | throw RequestException::create($request, $response); |
|
39 | } |
||
40 | |||
41 | 2 | return $response; |
|
42 | } |
||
44 |