From bdafc011a69999a82248460a238497530bb0dbbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 6 Apr 2021 15:20:39 +0800 Subject: [PATCH] add clear --- wchat/base/Subject.php | 16 ++--- wchat/base/Template.php | 20 +++--- wchat/common/Config.php | 80 +++++++++++------------ wchat/common/Help.php | 12 ++-- wchat/common/HttpClient.php | 14 ++-- wchat/common/Result.php | 2 +- wchat/officialaccount/Material.php | 12 ++-- wchat/officialaccount/NewsManager.php | 18 ++--- wchat/officialaccount/Subscribe.php | 26 ++++---- wchat/officialaccount/dcaler/Prpcrypt.php | 2 +- wchat/officialaccount/dcaler/XMLParse.php | 2 +- wchat/qq/Recharge.php | 10 +-- wchat/qq/Redhat.php | 80 +++++++++++------------ wchat/qq/SecCheck.php | 2 +- wchat/qq/pay/Cash_Bonus.php | 18 ++--- wchat/qq/pay/Enterprise_payment.php | 12 ++-- wchat/wx/Account.php | 12 ++-- wchat/wx/Message.php | 68 +++++++++---------- wchat/wx/PublicTemplate.php | 18 ++--- wchat/wx/Recharge.php | 6 +- wchat/wx/SecCheck.php | 6 +- wchat/wx/Subject.php | 2 +- wchat/wx/Template.php | 2 +- 23 files changed, 220 insertions(+), 220 deletions(-) diff --git a/wchat/base/Subject.php b/wchat/base/Subject.php index a457ed4..d026912 100644 --- a/wchat/base/Subject.php +++ b/wchat/base/Subject.php @@ -30,33 +30,33 @@ abstract class Subject extends Miniprogarampage } /** - * @param string $templateId + * @param $templateId */ - public function setTemplateId(string $templateId) + public function setTemplateId($templateId) { $this->templateId = $templateId; } /** - * @param string $openId + * @param $openId */ - public function setOpenId(string $openId) + public function setOpenId($openId) { $this->openId = $openId; } /** - * @param string $page + * @param $page */ - public function setPage(string $page) + public function setPage($page) { $this->page = $page; } /** - * @param string $emphasis_keyword + * @param $emphasis_keyword */ - public function setEmphasisKeyword(string $emphasis_keyword) + public function setEmphasisKeyword($emphasis_keyword) { $this->emphasis_keyword = $emphasis_keyword; } diff --git a/wchat/base/Template.php b/wchat/base/Template.php index e51731a..6095d7d 100644 --- a/wchat/base/Template.php +++ b/wchat/base/Template.php @@ -28,41 +28,41 @@ abstract class Template extends Miniprogarampage } /** - * @param string $templateId + * @param $templateId */ - public function setTemplateId(string $templateId) + public function setTemplateId($templateId) { $this->templateId = $templateId; } /** - * @param string $formId + * @param $formId */ - public function setFormId(string $formId) + public function setFormId($formId) { $this->formId = $formId; } /** - * @param string $openId + * @param $openId */ - public function setOpenId(string $openId) + public function setOpenId($openId) { $this->openId = $openId; } /** - * @param string $page + * @param $page */ - public function setPage(string $page) + public function setPage($page) { $this->page = $page; } /** - * @param string $emphasis_keyword + * @param $emphasis_keyword */ - public function setEmphasisKeyword(string $emphasis_keyword) + public function setEmphasisKeyword($emphasis_keyword) { $this->emphasis_keyword = $emphasis_keyword; } diff --git a/wchat/common/Config.php b/wchat/common/Config.php index 08a517c..c4243c8 100644 --- a/wchat/common/Config.php +++ b/wchat/common/Config.php @@ -124,10 +124,10 @@ class Config } /** - * @param string $ssl_ca + * @param $ssl_ca * @return Config */ - public function setSslCa(string $ssl_ca): Config + public function setSslCa($ssl_ca): Config { $this->ssl_ca = $ssl_ca; return $this; @@ -142,10 +142,10 @@ class Config } /** - * @param string $port + * @param $port * @return Config */ - public function setPort(string $port): Config + public function setPort($port): Config { $this->port = $port; return $this; @@ -178,10 +178,10 @@ class Config } /** - * @param string $agent + * @param $agent * @return Config */ - public function setAgent(string $agent): Config + public function setAgent($agent): Config { $this->agent = $agent; return $this; @@ -232,65 +232,65 @@ class Config } /** - * @param string $access_token + * @param $access_token */ - public function setAccessToken(string $access_token) + public function setAccessToken($access_token) { $this->access_token = $access_token; } /** - * @param string $remote_addr + * @param $remote_addr */ - public function setRemoteAddr(string $remote_addr) + public function setRemoteAddr($remote_addr) { $this->remote_addr = $remote_addr; } /** - * @param string $appid + * @param $appid */ - public function setAppid(string $appid) + public function setAppid($appid) { $this->appid = $appid; } /** - * @param string $mch_id + * @param $mch_id */ - public function setMchId(string $mch_id) + public function setMchId($mch_id) { $this->mch_id = $mch_id; } /** - * @param string $device_info + * @param $device_info */ - public function setDeviceInfo(string $device_info) + public function setDeviceInfo($device_info) { $this->device_info = $device_info; } /** - * @param string $nonce_str + * @param $nonce_str */ - public function setNonceStr(string $nonce_str) + public function setNonceStr($nonce_str) { $this->nonce_str = $nonce_str; } /** - * @param string $body + * @param $body */ - public function setBody(string $body) + public function setBody($body) { $this->body = $body; } /** - * @param string $out_trade_no + * @param $out_trade_no */ - public function setOutTradeNo(string $out_trade_no) + public function setOutTradeNo($out_trade_no) { $this->out_trade_no = $out_trade_no; } @@ -304,73 +304,73 @@ class Config } /** - * @param string $spbill_create_ip + * @param $spbill_create_ip */ - public function setSpbillCreateIp(string $spbill_create_ip) + public function setSpbillCreateIp($spbill_create_ip) { $this->spbill_create_ip = $spbill_create_ip; } /** - * @param string $notify_url + * @param $notify_url */ - public function setNotifyUrl(string $notify_url) + public function setNotifyUrl($notify_url) { $this->notify_url = $notify_url; } /** - * @param string $trade_type + * @param $trade_type */ - public function setTradeType(string $trade_type) + public function setTradeType($trade_type) { $this->trade_type = $trade_type; } /** - * @param string $sign_type + * @param $sign_type */ - public function setSignType(string $sign_type) + public function setSignType($sign_type) { $this->sign_type = $sign_type; } /** - * @param string $mch_host + * @param $mch_host */ - public function setMchHost(string $mch_host) + public function setMchHost($mch_host) { $this->mch_host = $mch_host; } /** - * @param string $appsecret + * @param $appsecret */ - public function setAppsecret(string $appsecret) + public function setAppsecret($appsecret) { $this->appsecret = $appsecret; } /** - * @param string $ssl_cert + * @param $ssl_cert */ - public function setSslCert(string $ssl_cert) + public function setSslCert($ssl_cert) { $this->ssl_cert = $ssl_cert; } /** - * @param string $ssl_key + * @param $ssl_key */ - public function setSslKey(string $ssl_key) + public function setSslKey($ssl_key) { $this->ssl_key = $ssl_key; } /** - * @param string $key + * @param $key */ - public function setKey(string $key) + public function setKey($key) { $this->key = $key; } diff --git a/wchat/common/Help.php b/wchat/common/Help.php index 4528ead..23bbab7 100644 --- a/wchat/common/Help.php +++ b/wchat/common/Help.php @@ -36,17 +36,17 @@ class Help extends Miniprogarampage */ private static function xmlChild(array $array) { - $string = ''; + $= ''; foreach ($array as $key => $value) { if (is_array($value)) { - $string .= static::xmlChild($value); + $.= static::xmlChild($value); continue; } if (is_numeric($value)) { - $string .= "<" . $key . ">" . $value . ""; + $.= "<" . $key . ">" . $value . ""; } else { - $string .= "<" . $key . ">"; + $.= "<" . $key . ">"; } } return $string; @@ -163,7 +163,7 @@ class Help extends Miniprogarampage public static function sign(array $array, $key, $type) { ksort($array, SORT_ASC); - $string = []; + $= []; foreach ($array as $hashKey => $val) { if (empty($val)) { continue; @@ -171,7 +171,7 @@ class Help extends Miniprogarampage $string[] = $hashKey . '=' . $val; } $string[] = 'key=' . $key; - $string = implode('&', $string); + $= implode('&', $string); if ($type == 'MD5') { return strtoupper(md5($string)); } else { diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index b7279e6..a32d4c7 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -328,35 +328,35 @@ class HttpClient } /** - * @param string $_string + * @param $_string * @return bool|string * @throws Exception */ - private function matchHost($_string = '') + private function matchHost($_= '') { if (empty($_string)) { return false; } if ($this->isHttp($_string)) { - $_string = str_replace('http://', '', $_string); + $_= str_replace('http://', '', $_string); $hostAndUrls = explode('/', $_string); $this->host = array_shift($hostAndUrls); - $_string = implode('/', $hostAndUrls); + $_= implode('/', $hostAndUrls); } else if ($this->isHttps($_string)) { - $_string = str_replace('https://', '', $_string); + $_= str_replace('https://', '', $_string); $this->setIsSSL(true); $hostAndUrls = explode('/', $_string); $this->host = array_shift($hostAndUrls); - $_string = implode('/', $hostAndUrls); + $_= implode('/', $hostAndUrls); } else if (empty($this->host)) { $hostAndUrls = explode('/', $_string); $this->host = array_shift($hostAndUrls); - $_string = implode('/', $hostAndUrls); + $_= implode('/', $hostAndUrls); } if (strpos($this->host, ':') !== false) { diff --git a/wchat/common/Result.php b/wchat/common/Result.php index 29641e6..dd3fbc0 100644 --- a/wchat/common/Result.php +++ b/wchat/common/Result.php @@ -130,7 +130,7 @@ class Result } /** - * @param string $name + * @param $name * @return mixed */ public function getData($name = '') diff --git a/wchat/officialaccount/Material.php b/wchat/officialaccount/Material.php index 61bd3cf..709bc8c 100644 --- a/wchat/officialaccount/Material.php +++ b/wchat/officialaccount/Material.php @@ -132,7 +132,7 @@ class Material extends AfficialAccount * @return mixed * @throws Exception */ - public function getMaterial(string $media_id) + public function getMaterial($media_id) { $this->request->setHost('api.weixin.qq.com'); $this->request->setErrorField('errcode'); @@ -154,7 +154,7 @@ class Material extends AfficialAccount * @return mixed * @throws Exception */ - public function delMaterial(string $media_id) + public function delMaterial($media_id) { $this->request->setHost('api.weixin.qq.com'); $this->request->setErrorField('errcode'); @@ -172,13 +172,13 @@ class Material extends AfficialAccount /** * declare - * @param string $media_id + * @param $media_id * @param int $index * @param array $articles * @return mixed * @throws Exception */ - public function modifyNewsMaterial(string $media_id, int $index, array $articles) + public function modifyNewsMaterial($media_id, int $index, array $articles) { $this->request->setHost('api.weixin.qq.com'); $this->request->setErrorField('errcode'); @@ -227,11 +227,11 @@ class Material extends AfficialAccount * declare * @param int $offset * @param int $size - * @param string $type + * @param $type * @return mixed * @throws Exception */ - public function getMaterialList(int $offset, int $size, string $type) + public function getMaterialList(int $offset, int $size, $type) { $this->request->setHost('api.weixin.qq.com'); $this->request->setErrorField('errcode'); diff --git a/wchat/officialaccount/NewsManager.php b/wchat/officialaccount/NewsManager.php index 131962f..084daae 100644 --- a/wchat/officialaccount/NewsManager.php +++ b/wchat/officialaccount/NewsManager.php @@ -53,10 +53,10 @@ class NewsManager extends AfficialAccount *
  • 将消息密文和安全签名打包成xml格式
  • * * - * @param $replyMsg string 公众平台待回复用户的消息,xml格式的字符串 - * @param $timeStamp string 时间戳,可以自己生成,也可以用URL参数的timestamp - * @param $nonce string 随机串,可以自己生成,也可以用URL参数的nonce - * @param &$encryptMsg string 加密后的可以直接回复用户的密文,包括msg_signature, timestamp, nonce, encrypt的xml格式的字符串, + * @param $replyMsg 公众平台待回复用户的消息,xml格式的字符串 + * @param $timeStamp 时间戳,可以自己生成,也可以用URL参数的timestamp + * @param $nonce 随机串,可以自己生成,也可以用URL参数的nonce + * @param &$encryptMsg 加密后的可以直接回复用户的密文,包括msg_signature, timestamp, nonce, encrypt的xml格式的字符串, * 当return返回0时有效 * * @return int 成功0,失败返回对应的错误码 @@ -100,11 +100,11 @@ class NewsManager extends AfficialAccount *
  • 对消息进行解密
  • * * - * @param $msgSignature string 签名串,对应URL参数的msg_signature - * @param $timestamp string 时间戳 对应URL参数的timestamp - * @param $nonce string 随机串,对应URL参数的nonce - * @param $postData string 密文,对应POST请求的数据 - * @param &$msg string 解密后的原文,当return返回0时有效 + * @param $msgSignature 签名串,对应URL参数的msg_signature + * @param $timestamp 时间戳 对应URL参数的timestamp + * @param $nonce 随机串,对应URL参数的nonce + * @param $postData 密文,对应POST请求的数据 + * @param &$msg 解密后的原文,当return返回0时有效 * * @return int 成功0,失败返回对应的错误码 */ diff --git a/wchat/officialaccount/Subscribe.php b/wchat/officialaccount/Subscribe.php index 25a8ffb..7030d4f 100644 --- a/wchat/officialaccount/Subscribe.php +++ b/wchat/officialaccount/Subscribe.php @@ -20,41 +20,41 @@ class Subscribe extends AfficialAccount private $pushUrl = 'https://api.weixin.qq.com/cgi-bin/message/template/subscribe?access_token='; /** - * @param string $openid + * @param $openid * @return Subscribe */ - public function setOpenid(string $openid): Subscribe + public function setOpenid($openid): Subscribe { $this->openid = $openid; return $this; } /** - * @param string $template_id + * @param $template_id * @return Subscribe */ - public function setTemplateId(string $template_id): Subscribe + public function setTemplateId($template_id): Subscribe { $this->template_id = $template_id; return $this; } /** - * @param string $url + * @param $url * @return Subscribe */ - public function setUrl(string $url): Subscribe + public function setUrl($url): Subscribe { $this->url = $url; return $this; } /** - * @param string $appid - * @param string $path + * @param $appid + * @param $path * @return Subscribe */ - public function setMiniprogram(string $appid, string $path): Subscribe + public function setMiniprogram($appid, $path): Subscribe { $this->miniprogram['appid'] = $appid; $this->miniprogram['pagepath'] = $path; @@ -62,20 +62,20 @@ class Subscribe extends AfficialAccount } /** - * @param string $scene + * @param $scene * @return Subscribe */ - public function setScene(string $scene): Subscribe + public function setScene($scene): Subscribe { $this->scene = $scene; return $this; } /** - * @param string $title + * @param $title * @return Subscribe */ - public function setTitle(string $title): Subscribe + public function setTitle($title): Subscribe { $this->title = $title; return $this; diff --git a/wchat/officialaccount/dcaler/Prpcrypt.php b/wchat/officialaccount/dcaler/Prpcrypt.php index 81bb8b6..d19d984 100644 --- a/wchat/officialaccount/dcaler/Prpcrypt.php +++ b/wchat/officialaccount/dcaler/Prpcrypt.php @@ -102,7 +102,7 @@ class Prpcrypt /** * 随机生成16位字符串 - * @return string 生成的字符串 + * @return 生成的字符串 */ function getRandomStr() { diff --git a/wchat/officialaccount/dcaler/XMLParse.php b/wchat/officialaccount/dcaler/XMLParse.php index 7d2c355..0cee4b8 100644 --- a/wchat/officialaccount/dcaler/XMLParse.php +++ b/wchat/officialaccount/dcaler/XMLParse.php @@ -10,7 +10,7 @@ class XMLParse { /** * 提取出xml数据包中的加密消息 - * @param string $xmltext 待提取的xml字符串 + * @param $xmltext 待提取的xml字符串 * @return array 提取出的加密消息字符串 */ public function extract($xmltext) diff --git a/wchat/qq/Recharge.php b/wchat/qq/Recharge.php index 271ab3a..8179e9d 100644 --- a/wchat/qq/Recharge.php +++ b/wchat/qq/Recharge.php @@ -26,21 +26,21 @@ class Recharge extends SmallProgram private $uniformer = 'https://qpay.qq.com/cgi-bin/pay/qpay_unified_order.cgi'; /** - * @param string $value + * @param $value */ - public function setSpillCreateIp(string $value) + public function setSpillCreateIp($value) { $this->spill_create_ip = $value; } /** * @param int $money - * @param string $orderNo - * @param string $openId + * @param $orderNo + * @param $openId * @return array|mixed|Result * @throws */ - public function recharge(int $money, string $orderNo, $openId = '') + public function recharge(int $money, $orderNo, $openId = '') { if ($money < 0) { return new Result(['code' => 500, 'message' => '充值金额不能小于0.']); diff --git a/wchat/qq/Redhat.php b/wchat/qq/Redhat.php index 33f2056..bbd4174 100644 --- a/wchat/qq/Redhat.php +++ b/wchat/qq/Redhat.php @@ -44,10 +44,10 @@ class Redhat extends SmallProgram } /** - * @param string $key + * @param $key * @return Redhat */ - public function setKey(string $key): Redhat + public function setKey($key): Redhat { $this->key = $key; return $this; @@ -62,10 +62,10 @@ class Redhat extends SmallProgram } /** - * @param string $signType + * @param $signType * @return Redhat */ - public function setSignType(string $signType): Redhat + public function setSignType($signType): Redhat { $this->signType = $signType; return $this; @@ -80,10 +80,10 @@ class Redhat extends SmallProgram } /** - * @param string $charset + * @param $charset * @return Redhat */ - public function setCharset(string $charset): Redhat + public function setCharset($charset): Redhat { $this->charset = $charset; return $this; @@ -98,10 +98,10 @@ class Redhat extends SmallProgram } /** - * @param string $nonce_str + * @param $nonce_str * @return Redhat */ - public function setNonceStr(string $nonce_str): Redhat + public function setNonceStr($nonce_str): Redhat { $this->nonce_str = $nonce_str; return $this; @@ -116,10 +116,10 @@ class Redhat extends SmallProgram } /** - * @param string $sign + * @param $sign * @return Redhat */ - public function setSign(string $sign): Redhat + public function setSign($sign): Redhat { $this->sign = $sign; return $this; @@ -137,10 +137,10 @@ class Redhat extends SmallProgram } /** - * @param string $mch_billno + * @param $mch_billno * @return Redhat */ - public function setMchBillno(string $mch_billno): Redhat + public function setMchBillno($mch_billno): Redhat { $this->mch_billno = $mch_billno; return $this; @@ -155,10 +155,10 @@ class Redhat extends SmallProgram } /** - * @param string $mch_id + * @param $mch_id * @return Redhat */ - public function setMchId(string $mch_id): Redhat + public function setMchId($mch_id): Redhat { $this->mch_id = $mch_id; return $this; @@ -173,10 +173,10 @@ class Redhat extends SmallProgram } /** - * @param string $mch_name + * @param $mch_name * @return Redhat */ - public function setMchName(string $mch_name): Redhat + public function setMchName($mch_name): Redhat { $this->mch_name = $mch_name; return $this; @@ -191,10 +191,10 @@ class Redhat extends SmallProgram } /** - * @param string $qqappid + * @param $qqappid * @return Redhat */ - public function setQqappid(string $qqappid): Redhat + public function setQqappid($qqappid): Redhat { $this->qqappid = $qqappid; return $this; @@ -209,10 +209,10 @@ class Redhat extends SmallProgram } /** - * @param string $re_openid + * @param $re_openid * @return Redhat */ - public function setReOpenid(string $re_openid): Redhat + public function setReOpenid($re_openid): Redhat { $this->re_openid = $re_openid; return $this; @@ -227,10 +227,10 @@ class Redhat extends SmallProgram } /** - * @param string $total_amount + * @param $total_amount * @return Redhat */ - public function setTotalAmount(string $total_amount): Redhat + public function setTotalAmount($total_amount): Redhat { $this->total_amount = $total_amount; return $this; @@ -245,10 +245,10 @@ class Redhat extends SmallProgram } /** - * @param string $total_num + * @param $total_num * @return Redhat */ - public function setTotalNum(string $total_num): Redhat + public function setTotalNum($total_num): Redhat { $this->total_num = $total_num; return $this; @@ -263,10 +263,10 @@ class Redhat extends SmallProgram } /** - * @param string $wishing + * @param $wishing * @return Redhat */ - public function setWishing(string $wishing): Redhat + public function setWishing($wishing): Redhat { $this->wishing = $wishing; return $this; @@ -281,10 +281,10 @@ class Redhat extends SmallProgram } /** - * @param string $act_name + * @param $act_name * @return Redhat */ - public function setActName(string $act_name): Redhat + public function setActName($act_name): Redhat { $this->act_name = $act_name; return $this; @@ -299,10 +299,10 @@ class Redhat extends SmallProgram } /** - * @param string $icon_id + * @param $icon_id * @return Redhat */ - public function setIconId(string $icon_id): Redhat + public function setIconId($icon_id): Redhat { $this->icon_id = $icon_id; return $this; @@ -317,10 +317,10 @@ class Redhat extends SmallProgram } /** - * @param string $banner_id + * @param $banner_id * @return Redhat */ - public function setBannerId(string $banner_id): Redhat + public function setBannerId($banner_id): Redhat { $this->banner_id = $banner_id; return $this; @@ -335,10 +335,10 @@ class Redhat extends SmallProgram } /** - * @param string $notify_url + * @param $notify_url * @return Redhat */ - public function setNotifyUrl(string $notify_url): Redhat + public function setNotifyUrl($notify_url): Redhat { $this->notify_url = $notify_url; return $this; @@ -353,10 +353,10 @@ class Redhat extends SmallProgram } /** - * @param string $not_send_msg + * @param $not_send_msg * @return Redhat */ - public function setNotSendMsg(string $not_send_msg): Redhat + public function setNotSendMsg($not_send_msg): Redhat { $this->not_send_msg = $not_send_msg; return $this; @@ -371,10 +371,10 @@ class Redhat extends SmallProgram } /** - * @param string $min_value + * @param $min_value * @return Redhat */ - public function setMinValue(string $min_value): Redhat + public function setMinValue($min_value): Redhat { $this->min_value = $min_value; return $this; @@ -389,10 +389,10 @@ class Redhat extends SmallProgram } /** - * @param string $max_value + * @param $max_value * @return Redhat */ - public function setMaxValue(string $max_value): Redhat + public function setMaxValue($max_value): Redhat { $this->max_value = $max_value; return $this; diff --git a/wchat/qq/SecCheck.php b/wchat/qq/SecCheck.php index a989c16..5c12dda 100644 --- a/wchat/qq/SecCheck.php +++ b/wchat/qq/SecCheck.php @@ -18,7 +18,7 @@ class SecCheck extends SmallProgram private $_msgUrl = '/api/json/security/MsgSecCheck?access_token='; /** - * @param string $path + * @param $path * @return array|Result|mixed */ public function image($path = '') diff --git a/wchat/qq/pay/Cash_Bonus.php b/wchat/qq/pay/Cash_Bonus.php index 4fd4375..5bf2205 100644 --- a/wchat/qq/pay/Cash_Bonus.php +++ b/wchat/qq/pay/Cash_Bonus.php @@ -17,7 +17,7 @@ use wchat\wx\SmallProgram; class Cash_Bonus extends SmallProgram { - public string $_cash = '/cgi-bin/hongbao/qpay_hb_mch_send.cgi'; + public $_cash = '/cgi-bin/hongbao/qpay_hb_mch_send.cgi'; private array $_errors = [ '66228701' => '红包个数超出限制', @@ -36,31 +36,31 @@ class Cash_Bonus extends SmallProgram private array $_requestParams = []; /** - * @param string $value + * @param $value */ - public function setMchName(string $value) + public function setMchName($value) { $this->_requestParams['mch_name'] = $value; } /** - * @param string $value + * @param $value */ - public function setActName(string $value) + public function setActName($value) { $this->_requestParams['act_name'] = $value; } /** - * @param string $value + * @param $value */ - public function setWishing(string $value) + public function setWishing($value) { $this->_requestParams['wishing'] = $value; } /** - * @param string $value + * @param $value */ public function setIconId($value) { @@ -68,7 +68,7 @@ class Cash_Bonus extends SmallProgram } /** - * @param string $value + * @param $value */ public function setBannerId($value) { diff --git a/wchat/qq/pay/Enterprise_payment.php b/wchat/qq/pay/Enterprise_payment.php index f79aa77..33ef25c 100644 --- a/wchat/qq/pay/Enterprise_payment.php +++ b/wchat/qq/pay/Enterprise_payment.php @@ -39,25 +39,25 @@ class Enterprise_payment extends SmallProgram private $_requestParams = []; /** - * @param string $value + * @param $value */ - public function setOpUserId(string $value) + public function setOpUserId($value) { $this->_requestParams['op_user_id'] = $value; } /** - * @param string $value + * @param $value */ - public function setOpUserPassword(string $value) + public function setOpUserPassword($value) { $this->_requestParams['op_user_passwd'] = $value; } /** - * @param string $value + * @param $value */ - public function setSpbillCreateIp(string $value) + public function setSpbillCreateIp($value) { $this->_requestParams['spbill_create_ip'] = $value; } diff --git a/wchat/wx/Account.php b/wchat/wx/Account.php index cb89999..1632161 100644 --- a/wchat/wx/Account.php +++ b/wchat/wx/Account.php @@ -15,11 +15,11 @@ use wchat\common\Result; class Account extends SmallProgram { - private string $wxaqr = 'https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token='; - private string $getwxacode = 'https://api.weixin.qq.com/wxa/getwxacode?access_token='; - private string $getwxacodeunlimit = 'https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token='; + private $wxaqr = 'https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token='; + private $getwxacode = 'https://api.weixin.qq.com/wxa/getwxacode?access_token='; + private $getwxacodeunlimit = 'https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token='; - private string $savePath = __DIR__ . '/../../Users/'; + private $savePath = __DIR__ . '/../../Users/'; /** @@ -130,7 +130,7 @@ class Account extends SmallProgram * @param $width * @param bool $is_hyaline * @param bool $auto_color - * @param string $line_color + * @param $line_color * @return array|mixed|Result * @throws \Exception */ @@ -159,7 +159,7 @@ class Account extends SmallProgram * @param $width * @param bool $is_hyaline * @param bool $auto_color - * @param string $line_color + * @param $line_color * @return array|mixed|Result * @throws \Exception */ diff --git a/wchat/wx/Message.php b/wchat/wx/Message.php index 8beaeb2..bb357f0 100644 --- a/wchat/wx/Message.php +++ b/wchat/wx/Message.php @@ -19,19 +19,19 @@ class Message extends SmallProgram /** - * @param string $openid + * @param $openid */ - public function setOpenid(string $openid) + public function setOpenid($openid) { $this->msgData['touser'] = $openid; } /** - * @param string $content + * @param $content * @return Result * @throws Exception */ - public function sendTextNews(string $content) + public function sendTextNews($content) { $this->msgData['msgtype'] = 'text'; $this->msgData['text'] = ['content' => $content]; @@ -44,7 +44,7 @@ class Message extends SmallProgram * @return Result * @throws Exception */ - public function sendImageNews(string $media_id) + public function sendImageNews($media_id) { $this->msgData['msgtype'] = 'image'; $this->msgData['image'] = ['media_id' => $media_id]; @@ -58,7 +58,7 @@ class Message extends SmallProgram * @return Result * @throws Exception */ - public function sendVoiceNews(string $media_id) + public function sendVoiceNews($media_id) { $this->msgData['msgtype'] = 'voice'; $this->msgData['voice'] = ['media_id' => $media_id]; @@ -71,7 +71,7 @@ class Message extends SmallProgram * @return Result * @throws Exception */ - public function sendMpNewsNews(string $media_id) + public function sendMpNewsNews($media_id) { $this->msgData['msgtype'] = 'mpnews'; $this->msgData['mpnews'] = ['media_id' => $media_id]; @@ -81,14 +81,14 @@ class Message extends SmallProgram /** - * @param string $title - * @param string $description - * @param string $url - * @param string $picurl + * @param $title + * @param $description + * @param $url + * @param $picurl * @return Result * @throws Exception */ - public function sendNewsNews(string $title, string $description, string $url, string $picurl) + public function sendNewsNews($title, $description, $url, $picurl) { $this->msgData['msgtype'] = 'news'; $this->msgData['news'] = ['articles' => [[ @@ -102,11 +102,11 @@ class Message extends SmallProgram /** - * @param string $title + * @param $title * @return Result * @throws Exception */ - public function sendCardNews(string $title) + public function sendCardNews($title) { $this->msgData['msgtype'] = 'wxcard'; $this->msgData['wxcard'] = ['card_id' => $title]; @@ -116,14 +116,14 @@ class Message extends SmallProgram /** - * @param string $media_id - * @param string $thumb_media_id - * @param string $title - * @param string $description + * @param $media_id + * @param $thumb_media_id + * @param $title + * @param $description * @return Result * @throws Exception */ - public function sendVideoNews(string $media_id, string $thumb_media_id, string $title, string $description) + public function sendVideoNews($media_id, $thumb_media_id, $title, $description) { $this->msgData['msgtype'] = 'video'; $this->msgData['video'] = ['media_id' => [ @@ -137,15 +137,15 @@ class Message extends SmallProgram /** - * @param string $musicurl - * @param string $hqmusicurl - * @param string $thumb_media_id - * @param string $title - * @param string $description + * @param $musicurl + * @param $hqmusicurl + * @param $thumb_media_id + * @param $title + * @param $description * @return Result * @throws Exception */ - public function sendMusicNews(string $musicurl, string $hqmusicurl, string $thumb_media_id, string $title, string $description) + public function sendMusicNews($musicurl, $hqmusicurl, $thumb_media_id, $title, $description) { $this->msgData['msgtype'] = 'music'; $this->msgData['music'] = [ @@ -160,13 +160,13 @@ class Message extends SmallProgram /** - * @param string $head_content - * @param string $tail_content + * @param $head_content + * @param $tail_content * @param array $menus * @return Result * @throws Exception */ - public function sendMenuNews(string $head_content, string $tail_content, array $menus = []) + public function sendMenuNews($head_content, $tail_content, array $menus = []) { $this->msgData['msgtype'] = 'msgmenu'; $this->msgData['msgmenu'] = [ @@ -206,7 +206,7 @@ class Message extends SmallProgram * @return Result * @throws Exception */ - public function sendMiniprogrampageNews(string $title, string $appid, string $pagepath, string $thumb_media_id) + public function sendMiniprogrampageNews($title, $appid, $pagepath, $thumb_media_id) { $this->msgData['msgtype'] = 'msgmenu'; $this->msgData['miniprogrampage'] = [ @@ -219,15 +219,15 @@ class Message extends SmallProgram } /** - * @param string $filePath - * @param string $type + * @param $filePath + * @param $type * @param bool $isPermanent - * @param string $title - * @param string $introduction + * @param $title + * @param $introduction * @return mixed * @throws Exception */ - public function upload(string $filePath, string $type, $isPermanent = false, string $title = '', string $introduction = '') + public function upload($filePath, $type, $isPermanent = false, $title = '', $introduction = '') { if (!file_exists($filePath)) { throw new Exception('文件不存在'); diff --git a/wchat/wx/PublicTemplate.php b/wchat/wx/PublicTemplate.php index 0a36ba5..ff90f03 100644 --- a/wchat/wx/PublicTemplate.php +++ b/wchat/wx/PublicTemplate.php @@ -32,25 +32,25 @@ class PublicTemplate extends SmallProgram } /** - * @param string $templateId + * @param $templateId */ - public function setTemplateId(string $templateId) + public function setTemplateId($templateId) { $this->templateId = $templateId; } /** - * @param string $openId + * @param $openId */ - public function setOpenId(string $openId) + public function setOpenId($openId) { $this->openId = $openId; } /** - * @param string $defaultUrl + * @param $defaultUrl */ - public function setDefaultUrl(string $defaultUrl) + public function setDefaultUrl($defaultUrl) { $this->defaultUrl = $defaultUrl; } @@ -58,7 +58,7 @@ class PublicTemplate extends SmallProgram /** * @param $name * @param $context - * @param string $color + * @param $color */ public function replaceKeyword($name, $context, $color = '') { @@ -84,7 +84,7 @@ class PublicTemplate extends SmallProgram /** * @param $context - * @param string $color + * @param $color */ public function setFirst($context, $color = '#f00') { @@ -96,7 +96,7 @@ class PublicTemplate extends SmallProgram /** * @param $context - * @param string $color + * @param $color */ public function setRemark($context, $color = '#000') { diff --git a/wchat/wx/Recharge.php b/wchat/wx/Recharge.php index 243aa37..48d8ba3 100644 --- a/wchat/wx/Recharge.php +++ b/wchat/wx/Recharge.php @@ -29,12 +29,12 @@ class Recharge extends SmallProgram /** * @param int $money - * @param string $orderNo - * @param string $openId + * @param $orderNo + * @param $openId * @return array|mixed|Result * @throws */ - public function recharge(int $money, string $orderNo, $openId = '') + public function recharge(int $money, $orderNo, $openId = '') { if ($money < 0) { return new Result(['code' => 500, 'message' => '充值金额不能小于0.']); diff --git a/wchat/wx/SecCheck.php b/wchat/wx/SecCheck.php index 30bec49..0070c7c 100644 --- a/wchat/wx/SecCheck.php +++ b/wchat/wx/SecCheck.php @@ -23,7 +23,7 @@ class SecCheck extends SmallProgram const MEDIA_IMAGE = 1; /** - * @param string $path + * @param $path * @return array|Result|mixed */ public function image($path = '') @@ -41,12 +41,12 @@ class SecCheck extends SmallProgram /** - * @param string $url + * @param $url * @param int $type * @return mixed * @throws */ - public function mediaAsync(string $url, $type = SecCheck::MEDIA_IMAGE) + public function mediaAsync($url, $type = SecCheck::MEDIA_IMAGE) { if (!in_array($type, [self::MEDIA_IMAGE, self::MEDIA_VIDEO])) { throw new \Exception('暂不支持的文件类型'); diff --git a/wchat/wx/Subject.php b/wchat/wx/Subject.php index 30eaa66..11c1d44 100644 --- a/wchat/wx/Subject.php +++ b/wchat/wx/Subject.php @@ -13,7 +13,7 @@ use wchat\common\Result; class Subject extends \wchat\base\Subject { - private string $sendUrl = 'https://api.weixin.qq.com/cgi-bin/message/subscribe/send'; + private $sendUrl = 'https://api.weixin.qq.com/cgi-bin/message/subscribe/send'; /** * @return string diff --git a/wchat/wx/Template.php b/wchat/wx/Template.php index f681962..ba7b709 100644 --- a/wchat/wx/Template.php +++ b/wchat/wx/Template.php @@ -14,7 +14,7 @@ namespace wchat\wx; */ class Template extends \wchat\base\Template { - private string $sendUrl = 'https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send'; + private $sendUrl = 'https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send'; public function getUrl() {