Skip to content

Commit 15e199f

Browse files
committed
use use statements
1 parent 2a243f5 commit 15e199f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Collector/Formatter.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
use Http\Client\Exception\TransferException;
88
use Http\Message\Formatter as MessageFormatter;
99
use Http\Message\Formatter\CurlCommandFormatter;
10+
use Psr\Http\Client\NetworkExceptionInterface;
11+
use Psr\Http\Client\RequestExceptionInterface;
1012
use Psr\Http\Message\RequestInterface;
1113
use Psr\Http\Message\ResponseInterface;
1214

@@ -49,11 +51,11 @@ public function __construct(MessageFormatter $formatter, CurlCommandFormatter $c
4951
*/
5052
public function formatException(Exception $exception)
5153
{
52-
if ($exception instanceof HttpException || $exception instanceof \Psr\Http\Client\RequestExceptionInterface) {
54+
if ($exception instanceof HttpException || $exception instanceof RequestExceptionInterface) {
5355
return $this->formatter->formatResponse($exception->getResponse());
5456
}
5557

56-
if ($exception instanceof TransferException || $exception instanceof \Psr\Http\Client\NetworkExceptionInterface) {
58+
if ($exception instanceof TransferException || $exception instanceof NetworkExceptionInterface) {
5759
return sprintf('Transfer error: %s', $exception->getMessage());
5860
}
5961

Collector/ProfileClient.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Http\Client\HttpAsyncClient;
99
use Http\Client\HttpClient;
1010
use Psr\Http\Client\ClientInterface;
11+
use Psr\Http\Client\RequestExceptionInterface;
1112
use Psr\Http\Message\RequestInterface;
1213
use Psr\Http\Message\ResponseInterface;
1314
use Symfony\Component\Stopwatch\Stopwatch;
@@ -182,7 +183,7 @@ private function collectResponseInformations(ResponseInterface $response, Stopwa
182183
*/
183184
private function collectExceptionInformations(\Exception $exception, StopwatchEvent $event, Stack $stack)
184185
{
185-
if ($exception instanceof HttpException || $exception instanceof \Psr\Http\Client\RequestExceptionInterface) {
186+
if ($exception instanceof HttpException || $exception instanceof RequestExceptionInterface) {
186187
$this->collectResponseInformations($exception->getResponse(), $event, $stack);
187188
}
188189

0 commit comments

Comments
 (0)