Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0261 |
Changes | 0 |
1 | <?php |
||
24 | 1 | public function request(RequestInterface $request, callable $handler) : PromiseInterface |
|
25 | { |
||
26 | try |
||
27 | { |
||
28 | 1 | return parent::request($request, $handler); |
|
29 | } |
||
30 | 1 | catch (TooManyRequestsHttpException $tooManyRequestsHttpException) |
|
31 | { |
||
32 | 1 | $response = $this->_getResponse($request); |
|
33 | 1 | if ($response !== null) |
|
34 | { |
||
35 | 1 | return new FulfilledPromise($response); |
|
36 | } |
||
37 | |||
38 | throw $tooManyRequestsHttpException; |
||
39 | } |
||
41 | } |