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

fixed namespace

parent 2a9679ea
No related branches found
No related tags found
1 merge request!4Devel
Pipeline #5128 canceled with stages
in 2 minutes and 34 seconds
<?php
namespace iFirmaVendor\WPDesk\HttpClient\Curl;
namespace WPDesk\HttpClient\Curl;
use iFirmaVendor\WPDesk\HttpClient\HttpClient;
use iFirmaVendor\WPDesk\HttpClient\HttpClientResponse;
use iFirmaVendor\WPDesk\HttpClient\HttpClientRequestException;
use WPDesk\HttpClient\HttpClient;
use WPDesk\HttpClient\HttpClientResponse;
use WPDesk\HttpClient\HttpClientRequestException;
class CurlClient implements \iFirmaVendor\WPDesk\HttpClient\HttpClient {
class CurlClient implements \WPDesk\HttpClient\HttpClient {
/** @var resource */
private $curlResource;
/** @var string|null|boolean */
......@@ -50,10 +50,10 @@ class CurlClient implements \iFirmaVendor\WPDesk\HttpClient\HttpClient {
return $this->prepareResponse();
} catch ( \Exception $e ) {
$this->closeConnection();
if ( $e instanceof \iFirmaVendor\WPDesk\HttpClient\HttpClientRequestException ) {
if ( $e instanceof \WPDesk\HttpClient\HttpClientRequestException ) {
throw $e;
}
throw \iFirmaVendor\WPDesk\HttpClient\Curl\CurlExceptionFactory::createDefaultException( $e->getMessage(), $e->getCode(), $e );
throw \WPDesk\HttpClient\Curl\CurlExceptionFactory::createDefaultException( $e->getMessage(), $e->getCode(), $e );
}
}
......@@ -132,7 +132,7 @@ class CurlClient implements \iFirmaVendor\WPDesk\HttpClient\HttpClient {
return;
}
$errorMessage = \curl_error( $this->curlResource );
throw \iFirmaVendor\WPDesk\HttpClient\Curl\CurlExceptionFactory::createCurlException( $errorMessage, $errorNumber );
throw \WPDesk\HttpClient\Curl\CurlExceptionFactory::createCurlException( $errorMessage, $errorNumber );
}
/**
......@@ -146,7 +146,7 @@ class CurlClient implements \iFirmaVendor\WPDesk\HttpClient\HttpClient {
private function prepareResponse() {
list( $rawHeaders, $rawBody ) = $this->extractResponseHeadersAndBody();
return new \iFirmaVendor\WPDesk\HttpClient\HttpClientResponse( $rawHeaders, $rawBody, $this->httpResponseCode );
return new \WPDesk\HttpClient\HttpClientResponse( $rawHeaders, $rawBody, $this->httpResponseCode );
}
/**
......
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