Skip to content

Commit

Permalink
Change privat to protected for getContext()
Browse files Browse the repository at this point in the history
  • Loading branch information
adiafora committed Dec 13, 2020
1 parent 86cab99 commit b0aa6a9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/AbstractApiClient.php
Expand Up @@ -45,8 +45,8 @@ abstract class AbstractApiClient
*/
public function __construct(string $method = Method::GET, array $params = [])
{
$this->params = $params;
$this->method = trim(strtoupper($method));
$this->params = $params;
$this->method = trim(strtoupper($method));
$this->context = $this->getContext();

if (defined('SET_CURLOPT_CONNECTTIMEOUT') === false) {
Expand Down Expand Up @@ -81,8 +81,8 @@ abstract public function getUrl(): string;
public function send(): ApiResponse
{
$urlForSend = $this->context->getUrlForSend();
$params = $this->getParams();
$headers = $this->getHeaders();
$params = $this->getParams();
$headers = $this->getHeaders();

try {
$curl = curl_init();
Expand Down Expand Up @@ -130,7 +130,7 @@ public function getMethod(): string
* @return AbstractContext
* @throws \Exception
*/
private function getContext(): AbstractContext
protected function getContext(): AbstractContext
{
switch ($this->method) {
case Method::GET:
Expand Down

0 comments on commit b0aa6a9

Please sign in to comment.