fix:更新已知bug,优化代码
This commit is contained in:
@@ -81,6 +81,8 @@ abstract class AccessToken implements AccessTokenInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*
|
||||
* @throws \EasyWeChat\Kernel\Exceptions\HttpException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
|
||||
@@ -93,6 +95,10 @@ abstract class AccessToken implements AccessTokenInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $refresh
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws \EasyWeChat\Kernel\Exceptions\HttpException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
|
||||
@@ -121,6 +127,11 @@ abstract class AccessToken implements AccessTokenInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $token
|
||||
* @param int $lifetime
|
||||
*
|
||||
* @return \EasyWeChat\Kernel\Contracts\AccessTokenInterface
|
||||
*
|
||||
* @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException
|
||||
* @throws \EasyWeChat\Kernel\Exceptions\RuntimeException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
@@ -140,6 +151,8 @@ abstract class AccessToken implements AccessTokenInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \EasyWeChat\Kernel\Contracts\AccessTokenInterface
|
||||
*
|
||||
* @throws \EasyWeChat\Kernel\Exceptions\HttpException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
|
||||
@@ -154,7 +167,8 @@ abstract class AccessToken implements AccessTokenInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $toArray
|
||||
* @param array $credentials
|
||||
* @param bool $toArray
|
||||
*
|
||||
* @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string
|
||||
*
|
||||
@@ -176,6 +190,11 @@ abstract class AccessToken implements AccessTokenInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Psr\Http\Message\RequestInterface $request
|
||||
* @param array $requestOptions
|
||||
*
|
||||
* @return \Psr\Http\Message\RequestInterface
|
||||
*
|
||||
* @throws \EasyWeChat\Kernel\Exceptions\HttpException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
|
||||
@@ -194,6 +213,10 @@ abstract class AccessToken implements AccessTokenInterface
|
||||
/**
|
||||
* Send http request.
|
||||
*
|
||||
* @param array $credentials
|
||||
*
|
||||
* @return ResponseInterface
|
||||
*
|
||||
* @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
@@ -217,6 +240,8 @@ abstract class AccessToken implements AccessTokenInterface
|
||||
/**
|
||||
* The request query will be used to add to the request.
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws \EasyWeChat\Kernel\Exceptions\HttpException
|
||||
* @throws \Psr\SimpleCache\InvalidArgumentException
|
||||
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
|
||||
@@ -229,6 +254,8 @@ abstract class AccessToken implements AccessTokenInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*
|
||||
* @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException
|
||||
*/
|
||||
public function getEndpoint(): string
|
||||
@@ -250,6 +277,8 @@ abstract class AccessToken implements AccessTokenInterface
|
||||
|
||||
/**
|
||||
* Credential for get token.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
abstract protected function getCredentials(): array;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user