This commit is contained in:
xl
2023-11-14 14:10:36 +08:00
parent f263014948
commit 70222819b9
13 changed files with 133 additions and 129 deletions
+17 -20
View File
@@ -15,10 +15,10 @@ class Account extends SmallProgram
{
/**
* @param $code
* @param string $code
* @return Result
*/
public function login($code): Result
public function login(string $code): Result
{
$param['appid'] = $this->payConfig->appId;
$param['secret'] = $this->payConfig->appSecret;
@@ -29,10 +29,10 @@ class Account extends SmallProgram
}
/**
* @param $code
* @param string $code
* @return Result
*/
public function AppLogin($code): Result
public function AppLogin(string $code): Result
{
$param['appid'] = $this->payConfig->pay->wx->appId;
$param['secret'] = $this->payConfig->pay->wx->appSecret;
@@ -43,11 +43,10 @@ class Account extends SmallProgram
}
/**
* @param $openid
* @param string $openid
* @return Result
* @throws Exception
*/
public function getPublicUserInfo($openid): Result
public function getPublicUserInfo(string $openid): Result
{
$query = [
'access_token' => $this->payConfig->getAccessToken(),
@@ -58,11 +57,10 @@ class Account extends SmallProgram
}
/**
* @param $openid
* @param string $openid
* @return Result
* @throws Exception
*/
public function getAppUserInfo($openid): Result
public function getAppUserInfo(string $openid): Result
{
$query = [
'access_token' => $this->payConfig->getAccessToken(),
@@ -73,12 +71,11 @@ class Account extends SmallProgram
/**
* @param $path
* @param $width
* @param string $path
* @param int $width
* @return array|mixed|Result
* @throws Exception
*/
public function createwxaqrcode($path, $width): mixed
public function createwxaqrcode(string $path, int $width): mixed
{
$url = 'cgi-bin/wxaapp/createwxaqrcode?access_token=';
$sendBody['path'] = $path;
@@ -89,14 +86,14 @@ class Account extends SmallProgram
/**
* @param $path
* @param $width
* @param string $path
* @param int $width
* @param bool $is_hyaline
* @param bool $auto_color
* @param string $line_color
* @return Result
*/
public function getwxacode($path, $width, bool $is_hyaline = false, bool $auto_color = false, string $line_color = ''): Result
public function getwxacode(string $path, int $width, bool $is_hyaline = false, bool $auto_color = false, string $line_color = ''): Result
{
$sendBody['path'] = $path;
$sendBody['width'] = $width;
@@ -112,14 +109,14 @@ class Account extends SmallProgram
/**
* @param $path
* @param $width
* @param string $path
* @param int $width
* @param bool $is_hyaline
* @param bool $auto_color
* @param string $line_color
* @return Result
*/
public function getwxacodeunlimit($path, $width, bool $is_hyaline = false, bool $auto_color = false, string $line_color = ''): Result
public function getwxacodeunlimit(string $path, int $width, bool $is_hyaline = false, bool $auto_color = false, string $line_color = ''): Result
{
$sendBody['path'] = $path;
$sendBody['width'] = $width;