Skip to content
Snippets Groups Projects
Commit 325d37f9 authored by Marcin Kolanko's avatar Marcin Kolanko
Browse files

fixed namespace

parent 4cc774d9
No related branches found
No related tags found
1 merge request!5fixed namespace
Pipeline #5175 passed with stages
in 3 minutes and 41 seconds
......@@ -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
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment