@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * @param MessageFormatter $formatter Formatter used to create message strings. |
| 58 | 58 | * @param string $logLevel Level at which to log requests. |
| 59 | 59 | * |
| 60 | - * @return callable Returns a function that accepts the next handler. |
|
| 60 | + * @return \Closure Returns a function that accepts the next handler. |
|
| 61 | 61 | */ |
| 62 | 62 | private static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = LogLevel::INFO) |
| 63 | 63 | { |
@@ -90,6 +90,9 @@ discard block |
||
| 90 | 90 | }; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | + /** |
|
| 94 | + * @param \Closure $handler |
|
| 95 | + */ |
|
| 93 | 96 | public function addHandler($handler) |
| 94 | 97 | { |
| 95 | 98 | $this->client->getConfig('handler')->push($handler); |
@@ -11,11 +11,9 @@ |
||
| 11 | 11 | use GuzzleHttp\MessageFormatter; |
| 12 | 12 | use GuzzleHttp\Middleware; |
| 13 | 13 | use GuzzleHttp\Pool; |
| 14 | -use GuzzleHttp\Promise\PromiseInterface; |
|
| 15 | 14 | use Psr\Http\Message\RequestInterface; |
| 16 | 15 | use Psr\Http\Message\ResponseInterface; |
| 17 | 16 | use Psr\Log\LoggerInterface; |
| 18 | -use Commercetools\Core\Error\Message; |
|
| 19 | 17 | use Commercetools\Core\Error\ApiException; |
| 20 | 18 | use Psr\Log\LogLevel; |
| 21 | 19 | |