From 325d37f92644c03d2147e0574077364e23626250 Mon Sep 17 00:00:00 2001 From: Marcin Kolanko <marcin@inspirelabs.pl> Date: Fri, 6 Dec 2019 14:57:30 +0000 Subject: [PATCH] fixed namespace --- src/Curl/CurlClient.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Curl/CurlClient.php b/src/Curl/CurlClient.php index 2eee95a..00c9686 100644 --- a/src/Curl/CurlClient.php +++ b/src/Curl/CurlClient.php @@ -50,10 +50,10 @@ class CurlClient implements HttpClient { return $this->prepareResponse(); } catch ( \Exception $e ) { $this->closeConnection(); - if ( $e instanceof \WPDesk\HttpClient\HttpClientRequestException ) { + if ( $e instanceof HttpClientRequestException ) { throw $e; } - throw \WPDesk\HttpClient\Curl\CurlExceptionFactory::createDefaultException( $e->getMessage(), $e->getCode(), $e ); + throw CurlExceptionFactory::createDefaultException( $e->getMessage(), $e->getCode(), $e ); } } @@ -132,7 +132,7 @@ class CurlClient implements HttpClient { return; } $errorMessage = \curl_error( $this->curlResource ); - throw \WPDesk\HttpClient\Curl\CurlExceptionFactory::createCurlException( $errorMessage, $errorNumber ); + throw CurlExceptionFactory::createCurlException( $errorMessage, $errorNumber ); } /** @@ -146,7 +146,7 @@ class CurlClient implements HttpClient { private function prepareResponse() { list( $rawHeaders, $rawBody ) = $this->extractResponseHeadersAndBody(); - return new \WPDesk\HttpClient\HttpClientResponse( $rawHeaders, $rawBody, $this->httpResponseCode ); + return new HttpClientResponse( $rawHeaders, $rawBody, $this->httpResponseCode ); } /** @@ -199,4 +199,4 @@ class CurlClient implements HttpClient { public function put( $url, $body, array $headers, $timeOut ) { return $this->send( $url, 'PUT', $body, $headers, $timeOut ); } -} \ No newline at end of file +} -- GitLab