From 1b19b16def1a8070b367dc7e461712e91732c3cd Mon Sep 17 00:00:00 2001 From: hedii Date: Wed, 4 Oct 2017 14:20:15 +0200 Subject: [PATCH] Make rawCall method protected instead of private There is no point keeping the rawCall method private. On the other hand, the rawCall method being protected makes it easier to extend \Ovh\Api class. Use case : I extend \Ovh\Api class and want to override get, post, put and delete methods to manipulate $content param before making a request. I cannot do this now because i cannot call private rawCall method from a child class. I can provide a quick explanation snippet if needed. --- src/Api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Api.php b/src/Api.php index 3fdb0ff..e7b5cc2 100644 --- a/src/Api.php +++ b/src/Api.php @@ -223,7 +223,7 @@ class Api * @return array * @throws \GuzzleHttp\Exception\ClientException if http request is an error */ - private function rawCall($method, $path, $content = null, $is_authenticated = true, $headers = null) + protected function rawCall($method, $path, $content = null, $is_authenticated = true, $headers = null) { $url = $this->endpoint . $path; $request = new Request($method, $url);