Add phan checks at max level

This commit is contained in:
2021-10-21 13:37:59 +09:00
parent c2721cb8d4
commit d0b676f8ce
7 changed files with 103 additions and 12 deletions

View File

@@ -321,7 +321,7 @@ class AWS
/**
* @param float $amount
* @param string $creation_id
* @param string|null $creation_id
* @return string
*/
public function getGiftCardPayload(float $amount, ?string $creation_id = null): string

View File

@@ -54,7 +54,7 @@ final class AmazonIncentives
/**
* @param float $value
* @param string $creation_request_id AWS creationRequestId
* @param string|null $creation_request_id AWS creationRequestId
* @return Response\CreateResponse
*
* @throws AmazonErrors

View File

@@ -55,7 +55,7 @@ class Client implements ClientInterface
$error_status = 'RESEND';
$error_code = 'T001';
$error_type = 'RateExceeded';
$message = $result_ar['message'];
$message = $result_ar['message'] ?? 'Rate exceeded';
} else {
// for all other error messages
$error_status = $result_ar['agcodResponse']['status'] ?? 'FAILURE';

View File

@@ -16,7 +16,7 @@ class AmazonDebug
*/
private static $debug = false;
/**
* @var string|null;
* @var string|null
*/
private static $id = null;
@@ -91,7 +91,7 @@ class AmazonDebug
if (self::$debug === false) {
return;
}
self::$log[self::getId()][] = $data;
self::$log[self::getId() ?? ''][] = $data;
}
/**