Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | 13 | public function request(RequestInterface $request, callable $handler): PromiseInterface |
|
13 | { |
||
14 | try |
||
15 | { |
||
16 | 13 | return parent::request($request, $handler); |
|
17 | } |
||
18 | 13 | catch (TooManyRequestsHttpException $tooManyRequestsHttpException) |
|
19 | { |
||
20 | 13 | $response = $this->_getResponse($request); |
|
21 | 13 | if ($response !== null) { |
|
22 | 7 | return new FulfilledPromise($response); |
|
23 | } |
||
24 | |||
25 | 8 | throw $tooManyRequestsHttpException; |
|
26 | } |
||
29 |