Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions src/IntercomClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,32 @@ class IntercomClient
/**
* @var HttpClient $httpClient
*/
private $httpClient;
protected $httpClient;

/**
* @var RequestFactory $requestFactory
*/
private $requestFactory;
protected $requestFactory;

/**
* @var UriFactory $uriFactory
*/
private $uriFactory;
protected $uriFactory;

/**
* @var string API user authentication
*/
private $appIdOrToken;
protected $appIdOrToken;

/**
* @var string API password authentication
*/
private $passwordPart;
protected $passwordPart;

/**
* @var array $extraRequestHeaders
*/
private $extraRequestHeaders;
protected $extraRequestHeaders;

/**
* @var IntercomUsers $users
Expand Down Expand Up @@ -312,7 +312,7 @@ public function getRateLimitDetails()
/**
* @return HttpClient
*/
private function getDefaultHttpClient()
protected function getDefaultHttpClient()
{
return new PluginClient(
HttpClientDiscovery::find(),
Expand All @@ -323,7 +323,7 @@ private function getDefaultHttpClient()
/**
* @return array
*/
private function getRequestHeaders()
protected function getRequestHeaders()
{
return array_merge(
[
Expand All @@ -340,7 +340,7 @@ private function getRequestHeaders()
*
* @return Authentication
*/
private function getAuth()
protected function getAuth()
{
if (!empty($this->appIdOrToken) && !empty($this->passwordPart)) {
return new BasicAuth($this->appIdOrToken, $this->passwordPart);
Expand All @@ -356,7 +356,7 @@ private function getAuth()
*
* @return RequestInterface
*/
private function authenticateRequest(RequestInterface $request)
protected function authenticateRequest(RequestInterface $request)
{
$auth = $this->getAuth();
return $auth ? $auth->authenticate($request) : $request;
Expand All @@ -370,7 +370,7 @@ private function authenticateRequest(RequestInterface $request)
* @return ResponseInterface
* @throws ClientExceptionInterface
*/
private function sendRequest($method, $uri, $body = null)
protected function sendRequest($method, $uri, $body = null)
{
$headers = $this->getRequestHeaders();
$body = is_array($body) ? json_encode($body) : $body;
Expand All @@ -386,7 +386,7 @@ private function sendRequest($method, $uri, $body = null)
*
* @return stdClass
*/
private function handleResponse(ResponseInterface $response)
protected function handleResponse(ResponseInterface $response)
{
$this->setRateLimitDetails($response);

Expand All @@ -398,7 +398,7 @@ private function handleResponse(ResponseInterface $response)
/**
* @param ResponseInterface $response
*/
private function setRateLimitDetails(ResponseInterface $response)
protected function setRateLimitDetails(ResponseInterface $response)
{
$this->rateLimitDetails = [
'limit' => $response->hasHeader('X-RateLimit-Limit')
Expand Down