add clear

This commit is contained in:
2022-09-09 16:42:55 +08:00
parent ad76b45b45
commit 7273fe1ce5
63 changed files with 2625 additions and 5287 deletions
+17 -19
View File
@@ -10,17 +10,17 @@ namespace wchat\qq\result;
class RedHatResult
{
public $result;
public $res_info;
public mixed $result;
public mixed $res_info;
public $listid;
public $state;
public $total_num;
public $recv_num;
public $total_amount;
public $recv_amount;
public $recv_details;
public $uin;
public mixed $listid;
public mixed $state;
public mixed $total_num;
public mixed $recv_num;
public mixed $total_amount;
public mixed $recv_amount;
public mixed $recv_details;
public mixed $uin;
const RED_HAT_STATUS_PAID = 1;
@@ -40,9 +40,9 @@ class RedHatResult
/**
* @param $array
* @return $this
* @return void
*/
private function init($array)
private function init($array): void
{
foreach ($array as $key => $value) {
if (!property_exists($this, $key)) {
@@ -50,7 +50,6 @@ class RedHatResult
}
$this->{$key} = $value;
}
return $this;
}
@@ -58,7 +57,7 @@ class RedHatResult
* @param $field
* @return mixed
*/
public function get($field)
public function get($field): mixed
{
return $this->$field;
}
@@ -68,7 +67,7 @@ class RedHatResult
* @return bool
* 是否已完成支付
*/
public function isPaid()
public function isPaid(): bool
{
return $this->state == self::RED_HAT_STATUS_PAID;
}
@@ -77,7 +76,7 @@ class RedHatResult
* @return bool
* 是否已抢完
*/
public function isSnatched()
public function isSnatched(): bool
{
return $this->state == self::RED_HAT_STATUS_SNATCHED;
}
@@ -86,17 +85,16 @@ class RedHatResult
/**
* @return bool
*/
public function isExpired()
public function isExpired(): bool
{
return $this->state == self::RED_HAT_STATUS_EXPIRED;
}
/**
* @return bool
*/
public function isRefunded()
public function isRefunded(): bool
{
return $this->state == self::RED_HAT_STATUS_REFUNDED;
}