Add PHPstan and fix all checks for max level

This commit is contained in:
2021-10-21 13:29:50 +09:00
parent 18cf3330df
commit c2721cb8d4
13 changed files with 140 additions and 116 deletions

View File

@@ -34,32 +34,27 @@ class CreateBalanceResponse
/**
* 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());
}
/**
@@ -99,13 +94,13 @@ class CreateBalanceResponse
*/
public function getRawJson(): string
{
return json_encode($this->raw_json);
return (json_encode($this->raw_json)) ?: '';
}
/**
* Undocumented function
*
* @param array $json_response
* @param array<mixed> $json_response
* @return CreateBalanceResponse
*/
public function parseJsonResponse(array $json_response): self