Debug log updates, error message updates on curl failure

Config setup works with null data if no data is set.

Debugger is now launched in the AamzonIncentive class at the beginning
Debugger id/debug flag set is now one static call
Debugger methods all have proper PHPdoc documentationn added

Fixed Client/Curl error messages to include the original error message
too. Also made sure that a possible null endpoint is not throwing errors
This commit is contained in:
2021-10-20 09:36:18 +09:00
parent f3b17bbf4c
commit a56f33c81c
7 changed files with 151 additions and 79 deletions

View File

@@ -80,9 +80,9 @@ class Config implements ConfigInterface
}
/**
* @return string
* @return string|null
*/
public function getEndpoint(): string
public function getEndpoint(): ?string
{
return $this->endpoint;
}
@@ -100,9 +100,9 @@ class Config implements ConfigInterface
}
/**
* @return string
* @return string|null
*/
public function getAccessKey(): string
public function getAccessKey(): ?string
{
return $this->access_key;
}
@@ -119,9 +119,9 @@ class Config implements ConfigInterface
}
/**
* @return string
* @return string|null
*/
public function getSecret(): string
public function getSecret(): ?string
{
return $this->secret_key;
}
@@ -138,9 +138,9 @@ class Config implements ConfigInterface
}
/**
* @return string
* @return string|null
*/
public function getCurrency(): string
public function getCurrency(): ?string
{
return $this->currency;
}
@@ -158,9 +158,9 @@ class Config implements ConfigInterface
}
/**
* @return string
* @return string|null
*/
public function getPartner(): string
public function getPartner(): ?string
{
return $this->partner_id;
}
@@ -177,9 +177,9 @@ class Config implements ConfigInterface
}
/**
* @return bool
* @return bool|null
*/
public function getDebug(): bool
public function getDebug(): ?bool
{
return $this->debug;
}