@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | * |
| 37 | 37 | * @param bool $delay default to true, can be false to speed up tests |
| 38 | 38 | * |
| 39 | - * @return callable |
|
| 39 | + * @return \Closure |
|
| 40 | 40 | */ |
| 41 | 41 | public function retry( $delay = true ) { |
| 42 | 42 | if( $delay ) { |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * Returns a method that takes the number of retries and returns the number of miliseconds |
| 51 | 51 | * to wait |
| 52 | 52 | * |
| 53 | - * @return callable |
|
| 53 | + * @return \Closure |
|
| 54 | 54 | */ |
| 55 | 55 | private function getRetryDelay() { |
| 56 | 56 | return function( $numberOfRetries ) { |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | - * @return callable |
|
| 62 | + * @return \Closure |
|
| 63 | 63 | */ |
| 64 | 64 | private function newRetryDecider() { |
| 65 | 65 | return function ( |
@@ -5,12 +5,9 @@ |
||
| 5 | 5 | use GuzzleHttp\Client; |
| 6 | 6 | use GuzzleHttp\ClientInterface; |
| 7 | 7 | use GuzzleHttp\Exception\RequestException; |
| 8 | -use GuzzleHttp\Handler\CurlHandler; |
|
| 9 | -use GuzzleHttp\HandlerStack; |
|
| 10 | 8 | use GuzzleHttp\Promise\PromiseInterface; |
| 11 | 9 | use InvalidArgumentException; |
| 12 | 10 | use Mediawiki\Api\Guzzle\ClientFactory; |
| 13 | -use Mediawiki\Api\Guzzle\MiddlewareFactory; |
|
| 14 | 11 | use Psr\Http\Message\ResponseInterface; |
| 15 | 12 | use Psr\Log\LoggerAwareInterface; |
| 16 | 13 | use Psr\Log\LoggerInterface; |