Add PHPstan and fix all checks for max level
This commit is contained in:
@@ -28,31 +28,26 @@ class CancelResponse
|
||||
/**
|
||||
* Amazon Gift Card Raw JSON
|
||||
*
|
||||
* @var string
|
||||
* @var array<mixed>
|
||||
*/
|
||||
protected $raw_json;
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $log;
|
||||
|
||||
/**
|
||||
* Response constructor.
|
||||
* @param array $json_response
|
||||
* @param array<mixed> $json_response
|
||||
*/
|
||||
public function __construct(array $json_response)
|
||||
{
|
||||
$this->raw_json = $json_response;
|
||||
$this->log = AmazonDebug::getLog(AmazonDebug::getId());
|
||||
$this->parseJsonResponse($json_response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return array<mixed>
|
||||
*/
|
||||
public function getLog(): array
|
||||
{
|
||||
return $this->log;
|
||||
return AmazonDebug::getLog(AmazonDebug::getId());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,11 +79,11 @@ class CancelResponse
|
||||
*/
|
||||
public function getRawJson(): string
|
||||
{
|
||||
return json_encode($this->raw_json);
|
||||
return (json_encode($this->raw_json)) ?: '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $json_response
|
||||
* @param array<mixed> $json_response
|
||||
* @return CancelResponse
|
||||
*/
|
||||
public function parseJsonResponse(array $json_response): self
|
||||
|
||||
Reference in New Issue
Block a user