Skip to content

Commit 6ded836

Browse files
committed
sendRequest, handleResult and handleError should be protected
So ApiClient class can be extended to implement missing API methods.
1 parent 7ff5135 commit 6ded836

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ApiClient.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private function getToken()
103103
*
104104
* @return stdClass
105105
*/
106-
private function sendRequest($path, $method = 'GET', $data = array(), $useToken = true)
106+
protected function sendRequest($path, $method = 'GET', $data = array(), $useToken = true)
107107
{
108108
$url = $this->apiUrl . '/' . $path;
109109
$method = strtoupper($method);
@@ -168,7 +168,7 @@ private function sendRequest($path, $method = 'GET', $data = array(), $useToken
168168
*
169169
* @return stdClass
170170
*/
171-
private function handleResult($data)
171+
protected function handleResult($data)
172172
{
173173
if (empty($data->data)) {
174174
$data->data = new stdClass();
@@ -188,7 +188,7 @@ private function handleResult($data)
188188
*
189189
* @return stdClass
190190
*/
191-
private function handleError($customMessage = null)
191+
protected function handleError($customMessage = null)
192192
{
193193
$message = new stdClass();
194194
$message->is_error = true;

0 commit comments

Comments
 (0)